[issue12803] SSLContext.load_cert_chain() should accept a password argument

Adam Simpkins report at bugs.python.org
Thu Aug 25 07:43:28 CEST 2011


Adam Simpkins <adam at adamsimpkins.net> added the comment:

OpenSSL doesn't appear to do any special handling for i18n, and just
treats the strings as binary data.  It uses fgets() to read the password
from the terminal, so it will receive it however the terminal encodes
it.

It's not clear to me that PyUnicode_EncodeFSDefault() is quite the right
thing to do.  The initfsencoding() routine seems different from how
initstdio() works (which checks the PYTHONIOENCODING environment
variable, and then appears to fall back to os.device_encoding()).

I'm leaning towards just updating the docs to specify that if a string
is supplied it will be encoded using UTF-8.  I'm happy to do either way
you recommend, though.

----------

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


More information about the Python-bugs-list mailing list