Clarify return values for EVP_DigestVerifyFinal.

Previous language was unclear.  New language isn't pretty but I believe
it is more accurate.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Laurie <ben@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 8cbb048c3ea416f2bd8a3706d027f3aa26ef08d9)
This commit is contained in:
Adam Eijdenberg 2015-10-19 11:16:25 -07:00 committed by Rich Salz
parent b2593839da
commit 2d404dc380

View File

@ -37,10 +37,11 @@ EVP_DigestVerifyInit() and EVP_DigestVerifyUpdate() return 1 for success and 0
or a negative value for failure. In particular a return value of -2 indicates or a negative value for failure. In particular a return value of -2 indicates
the operation is not supported by the public key algorithm. the operation is not supported by the public key algorithm.
Unlike other functions the return value 0 from EVP_DigestVerifyFinal() only EVP_DigestVerifyFinal() returns 1 for success; any other value indicates
indicates that the signature did not verify successfully (that is tbs did failure. A return value of zero indicates that the signature did not verify
not match the original data or the signature was of invalid form) it is not an successfully (that is, tbs did not match the original data or the signature had
indication of a more serious error. an invalid form), while other values indicate a more serious error (and
sometimes also indicate an invalid signature form).
The error codes can be obtained from L<ERR_get_error(3)|ERR_get_error(3)>. The error codes can be obtained from L<ERR_get_error(3)|ERR_get_error(3)>.