Commit bbbf752a authored by Nick Mathewson's avatar Nick Mathewson Committed by Richard Levitte
Browse files

Update documentation for PEM callback: error is now -1.



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 c82c3462, 0 is now treated as a non-error
return value.  Applications that want to indicate an error need to
return -1 instead.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6271)
parent 1bb82930
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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
value as the B<u> parameter passed to the PEM routine. It allows
arbitrary data to be passed to the callback by the application
arbitrary data to be passed to the callback by the application
(for example a window handle in a GUI application). The callback
(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.
an error occurred.


=head1 EXAMPLES
=head1 EXAMPLES