From: Viktor Dukhovni Date: Tue, 17 May 2016 01:38:03 +0000 (-0400) Subject: Clarify negative return from X509_verify_cert() X-Git-Tag: OpenSSL_1_0_2i~180 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=96747f0f4e43863a1ec446a95463c2fca9b6ae82;p=oweals%2Fopenssl.git Clarify negative return from X509_verify_cert() Reviewed-by: Tim Hudson --- diff --git a/doc/crypto/X509_verify_cert.pod b/doc/crypto/X509_verify_cert.pod index a22e44118c..4689e3afea 100644 --- a/doc/crypto/X509_verify_cert.pod +++ b/doc/crypto/X509_verify_cert.pod @@ -31,12 +31,13 @@ Applications rarely call this function directly but it is used by OpenSSL internally for certificate validation, in both the S/MIME and SSL/TLS code. -The negative return value from X509_verify_cert() can only occur if no -certificate is set in B (due to a programming error); if X509_verify_cert() -twice without reinitialising B in between; or if a retry -operation is requested during internal lookups (which never happens with -standard lookup methods). It is however recommended that application check -for <= 0 return value on error. +A negative return value from X509_verify_cert() can occur if it is invoked +incorrectly, such as with no certificate set in B, or when it is called +twice in succession without reinitialising B for the second call. +A negative return value can also happen due to internal resource problems or if +a retry operation is requested during internal lookups (which never happens +with standard lookup methods). +Applications must check for <= 0 return value on error. =head1 BUGS