OpenSSL Selection of Text Encoding for the -out and -text Options

Douglas Morris dougbmorris at
Sun Jan 19 02:51:53 UTC 2020

I'm working on an ACME client written in Python3. I expect the certificate sent by the ACME server will be in utf-8 per RFC 8555, sec. 5. It seems from Python Standard Library function sys.getfilesystemencoding() that a filesystem has a particular encoding for filesystem names (which is not an explicit default for text files). I wonder if OpenSSL (and generally other software) automatically uses the filesystem name encoding by default for all text output. I don't see anything about text encoding on the "Compilation and Installation" wiki page. I have OpenSSL from a Debian package. I don't see anything about text encoding in the configuration file /etc/ssl/openssl.cnf.

What is/are and how does OpenSSL choose the text encodings for -out and -text, respectively. Information about line encoding selection would be a nice bonus. I would guess that line encoding is determined by the OS target and is essentially hardcoded to the package or source code distribution. I would like to have all my related domain certification files in the same text encoding and to decode the -text output into a string value as reliably (and as transparently to the user) as possible. My fallback position is of course to just hardcode utf-8. I would like to avoid that unless it's the smart thing to do. (I don't follow Windows but know is used to favor utf-16.) Thanks.

Douglas Morris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the openssl-users mailing list