[Twisted-Python] SSL example in tutorial isn't working for me
Yun Mao
maoy at cis.upenn.edu
Sat Nov 29 19:17:36 MST 2003
I see what's wrong here.
This is part of finger22.py
def getContext(self):
"""Create an SSL context.
This is a sample implementation that loads a certificate from a
file
called 'server.pem'."""
ctx = SSL.Context(SSL.SSLv23_METHOD)
ctx.use_certificate_file('server.pem')
ctx.use_privatekey_file('server.pem')
return ctx
I should have substituted the certificate_file to the certificate file..
Yun
On Sat, 29 Nov 2003, Jp Calderone wrote:
> On Sat, Nov 29, 2003 at 06:06:05PM -0500, Yun Mao wrote:
> > http://www.twistedmatrix.com/documents/howto/listings/finger/finger22.py
> >
> > Error:
> >
> > 2003/11/29 18:00 EST [-] NameError: global name 'SSL' is not defined
> >
> > Is it because someone commented out from OpenSSL import SSL?
>
> Probably. It is unclear why this has been done.
>
> > I uncomment it and emerge pyOpennSSL but it still doesn't work. :(
>
> How does it not work?
>
> Jp
>
More information about the Twisted-Python
mailing list