i have add following line to my punjab.tac file for authentication support
sslContext = ssl.DefaultOpenSSLContextFactory(
'/path/to/privkey.pem',
'/path/to/cacert.pem',
)
as it shows its seeking for privkey.pem and cacert.pem , but can anyone explain what it is looking for so that i can set up the appropriate path for these.
bcoz after adding above lines when i run punjab i am getting follwoing error , so can anyone help me what am i missing and wht i required plz.
twistd -y punjab.tac
Unhandled Error
Traceback (most recent call last):
File
"/usr/local/lib/python2.7/site-packages/twisted/application/app.py",
line 652, in run
runApp(config)
File
"/usr/local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line
23, in runApp
_SomeApplicationRunner(config).run()
File
"/usr/local/lib/python2.7/site-packages/twisted/application/app.py",
line 386, in run
self.application = self.createOrGetApplication()
File
"/usr/local/lib/python2.7/site-packages/twisted/application/app.py",
line 451, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- <exception caught here> ---
File
"/usr/local/lib/python2.7/site-packages/twisted/application/app.py",
line 462, in getApplication
application = service.loadApplication(filename, style, passphrase)
File
"/usr/local/lib/python2.7/site-packages/twisted/application/service.py",
line 405, in loadApplication
application = sob.loadValueFromFile(filename, 'application',
passphrase)
File
"/usr/local/lib/python2.7/site-packages/twisted/persisted/sob.py", line
210, in loadValueFromFile
exec fileObj in d, d
File "punjab.tac", line 39, in <module>
'/path/to/cacert.pem',
File "/usr/local/lib/python2.7/site-packages/twisted/internet/ssl.py",
line 68, in __init__
self.cacheContext()
File "/usr/local/lib/python2.7/site-packages/twisted/internet/ssl.py",
line 77, in cacheContext
ctx.use_certificate_file(self.certificateFileName)
OpenSSL.SSL.Error: [('system library', 'fopen', 'No such file or
directory'), ('BIO routines', 'FILE_CTRL', 'system lib'), ('SSL
routines', 'SSL_CTX_use_certificate_file', 'system lib')]
Failed to load application: [('system library', 'fopen', 'No such file
or directory'), ('BIO routines', 'FILE_CTRL', 'system lib'), ('SSL
routines', 'SSL_CTX_use_certificate_file', 'system lib')]