Update documentation for PEM callback: error is now -1.
authorNick Mathewson <nickm@torproject.org>
Wed, 16 May 2018 15:07:48 +0000 (11:07 -0400)
committerRichard Levitte <levitte@openssl.org>
Sat, 26 May 2018 06:36:42 +0000 (08:36 +0200)
In previous versions of OpenSSL, the documentation for PEM_read_*
said:

   The callback B<must> return the number of characters in the
   passphrase or 0 if an error occurred.

But since c82c3462267afdbbaa5, 0 is now treated as a non-error
return value.  Applications that want to indicate an error need to
return -1 instead.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6271)

doc/man3/PEM_read_bio_PrivateKey.pod

index 9f62140ce63fcf3f4b85fc9550e86d71015b7c7a..4fb4d1159aec9163b98052e8e63de4958edfff20 100644 (file)
@@ -295,7 +295,7 @@ for it twice) if B<rwflag> is 1. The B<u> parameter has the same
 value as the B<u> 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
-B<must> return the number of characters in the passphrase or 0 if
+B<must> return the number of characters in the passphrase or -1 if
 an error occurred.
 
 =head1 EXAMPLES