[pyOpenSSL] crypto.load_certificate() throws 'no start line'
Dave Cridland
dave at cridland.net
Wed Aug 19 18:03:20 CEST 2009
On Tue Aug 18 17:57:53 2009, Matthias Güntert wrote:
> Can someone please tell, why for gods sake i receive this error?
>
> -------------------------
> Traceback (most recent call last):
> File "test.py", line 2, in <module>
> crypto.load_certificate(crypto.FILETYPE_PEM, 'client.pem')
> OpenSSL.crypto.Error: [('PEM routines', 'PEM_read_bio', 'no start
> line')]
> -------------------------
Because the string 'client.pem' does not have a PEM start line...
crypto.load_certificate(crypto.FILETYPE_PEM,
file('client.pem').read())
will do what you want.
Dave.
--
Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at dave.cridland.net
- acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
- http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
More information about the pyopenssl-users
mailing list