[issue16487] Allow ssl certificates to be specified from memory rather than files.

Kristján Valur Jónsson report at bugs.python.org
Fri Jun 28 01:15:29 CEST 2013


Kristján Valur Jónsson added the comment:

Okay, I have updated the patch as suggested.
string mode means PEM encoding, binary mode DER encoding.
Note that DER encoding is more limited, there is no way to concatentate private keys and certificates into one file (the PEM decoder searches the file until it finds the proper data it is looking for, certificate or private key).

Also, the unittests don't test for DER encoded private key, because there is no way to generate them currently.  The conversion functions in ssl only cope with certificates.  Although adding them, changing them would be trivial.  These functions should also probably know how to split a PEM file into sections so that they can be individually converted.

----------
Added file: http://bugs.python.org/file30718/ssl2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16487>
_______________________________________


More information about the Python-bugs-list mailing list