/usr/lib/cgi-bin/pyca/pycacnf.py is in pyca 20031119-0.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | """
pycacnf.py - Read OpenSSL configuration file openssl.cnf
(c) by Michael Stroeder <michael@stroeder.com>
"""
__version__ = '0.6.6'
import os
########################################################################
# Some variables for configuration
########################################################################
# Full pathname of OpenSSL configuration file,
# most times named openssl.cnf
cnf_filename = '/etc/pyca/openssl.cnf'
# List of additional module directories
pylib = [
os.environ.get('PYCALIB','/usr/share/pyca/pylib')
]
########################################################################
# There's nothing to configure below this line
########################################################################
import sys,os
# Extend the Python path
sys.path.extend(pylib)
if os.path.isfile('%s.pickle' % (cnf_filename)):
# Try to read OpenSSL's config file from a pickled copy
f=open('%s.pickle' % (cnf_filename),'rb')
try:
# first try to use the faster cPickle module
from cPickle import load
except ImportError:
from pickle import load
opensslcnf=load(f)
f.close()
else:
# Read OpenSSL's config file from source
import openssl
opensslcnf=openssl.cnf.OpenSSLConfigClass(cnf_filename)
# Diverse allgemeine Parameter aus der Sektion [ pyca ] uebernehmen
pyca_section = opensslcnf.data.get('pyca',{})
import htmlbase
htmlbase.bodyPARAM=pyca_section.get('htmlBodyParam','')
ErrorLog = pyca_section.get('ErrorLog','')
if ErrorLog:
# Redirect error log to defined file
# FIX ME! File locking for concurrent access needed?
sys.stderr.flush()
sys.stderr = open(ErrorLog,'a')
|