Update the documented return values for the EVP_DigestVerifyInit, EVP_DigestVerifyUpdate, EVP_CIPHER_param_to_asn1 and EVP_CIPHER_asn1_to_param so they match the code.
Justification: EVP_CIPHER_param_to_asn1: returns -1 on failure and 1 or the size of the IV on success. https://github.com/openssl/openssl/blob/master/crypto/evp/evp_lib.c#L64 EVP_CIPHER_asn1_to_param: returns -1 on failure or 1 or the size of the IV on success (checked also with the RC2 ASN.1 parameter parsing). https://github.com/openssl/openssl/blob/master/crypto/evp/evp_lib.c#L81 EVP_DigestVerifyInit only returns 0 on failure or 1 on success: https://github.com/openssl/openssl/blob/master/crypto/evp/m_sigver.c#L116 EVP_DigestVerifyUpdate is #defined to EVP_DigestUpdate that is already documented to return 1 for success or 0 for failure Typedef location https://github.com/openssl/openssl/blob/master/include/openssl/evp.h#L589
>From 8efc6832a0ef5febbf06b9f70e39fb1232c471c5 Mon Sep 17 00:00:00 2001 From: Laetitia Baudoin <[email protected]> Date: Fri, 3 Apr 2015 16:29:14 -0700 Subject: [PATCH] Fix the EVP_DigestVerifyInit, EVP_DigestVerifyUpdate, EVP_CIPHER_param_to_asn1 and EVP_CIPHER_asn1_to_param documentation. --- doc/crypto/EVP_DigestVerifyInit.pod | 3 +-- doc/crypto/EVP_EncryptInit.pod | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/crypto/EVP_DigestVerifyInit.pod b/doc/crypto/EVP_DigestVerifyInit.pod index e0217e4..d3316e9 100644 --- a/doc/crypto/EVP_DigestVerifyInit.pod +++ b/doc/crypto/EVP_DigestVerifyInit.pod @@ -34,8 +34,7 @@ B<sig> of length B<siglen>. =head1 RETURN VALUES 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 -the operation is not supported by the public key algorithm. +for failure. Unlike other functions the return value 0 from EVP_DigestVerifyFinal() only indicates that the signature did not verify successfully (that is tbs did diff --git a/doc/crypto/EVP_EncryptInit.pod b/doc/crypto/EVP_EncryptInit.pod index 6d897da..95ce467 100644 --- a/doc/crypto/EVP_EncryptInit.pod +++ b/doc/crypto/EVP_EncryptInit.pod @@ -282,8 +282,8 @@ OBJECT IDENTIFIER or NID_undef if it has no defined OBJECT IDENTIFIER. EVP_CIPHER_CTX_cipher() returns an B<EVP_CIPHER> structure. -EVP_CIPHER_param_to_asn1() and EVP_CIPHER_asn1_to_param() return 1 for -success or zero for failure. +EVP_CIPHER_param_to_asn1() and EVP_CIPHER_asn1_to_param() return > 0 for +success or <= 0 for failure. =head1 CIPHER LISTING -- 2.2.0.rc0.207.ga3a616c
_______________________________________________ openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
