[Twisted-Python] SSL Server and Client

Chakkaradeep C C chaks.yoper at gmail.com
Wed May 9 21:42:43 EDT 2007


Hi,

I am trying out this
example<http://twistedmatrix.com/pipermail/twisted-python/2007-May/015325.html>to
start with twisted and ssl

I generated my certificate by the command,

openssl genrsa -des3 -out server.pem 1024

When I execute the program, I get this error,

chaks at chaks-laptop:~/LDMS$ python twisted-ssl.py
Enter PEM pass phrase:
Traceback (most recent call last):
  File "twisted-ssl.py", line 17, in <module>
    theCert = PrivateCertificate.loadPEM(file('server.pem','r').read())
  File "/usr/lib/python2.5/site-packages/twisted/internet/_sslverify.py",
line 584, in loadPEM
    crypto.FILETYPE_PEM)
  File "/usr/lib/python2.5/site-packages/twisted/internet/_sslverify.py",
line 561, in load
    return Class._load(data, format)._setPrivateKey(privateKey)
  File "/usr/lib/python2.5/site-packages/twisted/internet/_sslverify.py",
line 395, in load
    return Class(crypto.load_certificate(format, requestData), *args)
OpenSSL.crypto.Error: [('PEM routines', 'PEM_read_bio', 'no start line')]

What am i doing wrong ? Am i missing something here ?

Thanks.

-- 
Regards,
C.C.Chakkaradeep,
http://chakkaradeep.net
--
"Sometimes it's better not to ask - or to listen - when people tell you
something can't be done. I didnt ask for permission or approval. I just went
ahead and did it."  - from "Direct from Dell"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20070510/91347986/attachment.htm 


More information about the Twisted-Python mailing list