[pyOpenSSL] crypto.load_certificate() throws 'no start line'
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Wed Aug 19 19:22:07 CEST 2009
On 04:03 pm, dave at cridland.net wrote:
>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.
Groan. Good catch, Dave. :)
Jean-Paul
More information about the pyopenssl-users
mailing list