From: Tomas Mraz Date: Tue, 21 Dec 2021 14:58:44 +0000 (+0100) Subject: pem_password_cb: Clarify the documentation on passphrases X-Git-Tag: openssl-3.2.0-alpha1~3157 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b5342e04ff24d5138c054c1677c32729d47e938;p=thirdparty%2Fopenssl.git pem_password_cb: Clarify the documentation on passphrases Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/17320) --- diff --git a/doc/man3/PEM_read_bio_PrivateKey.pod b/doc/man3/PEM_read_bio_PrivateKey.pod index a71907b1701..27e7849ef7e 100644 --- a/doc/man3/PEM_read_bio_PrivateKey.pod +++ b/doc/man3/PEM_read_bio_PrivateKey.pod @@ -335,7 +335,7 @@ I bytes at I are used as the passphrase and I is ignored. If the I parameters is set to NULL and the I parameter is not -NULL then the I parameter is interpreted as a null terminated string +NULL then the I parameter is interpreted as a NUL terminated string to use as the passphrase. If both I and I are NULL then the default callback routine is used which will typically prompt for the passphrase on the current terminal with echoing turned off. @@ -355,7 +355,8 @@ value as the I parameter passed to the PEM routine. It allows arbitrary data to be passed to the callback by the application (for example a window handle in a GUI application). The callback I return the number of characters in the passphrase or -1 if -an error occurred. +an error occurred. The passphrase can be arbitrary data; in the case where it +is a string, it is not NUL terminated. See the L section below. Some implementations may need to use cryptographic algorithms during their operation. If this is the case and I and I parameters have been