Commit 5fba3912 authored by Viktor Dukhovni's avatar Viktor Dukhovni
Browse files

Clarify negative return from X509_verify_cert()

parent 87275905
Loading
Loading
Loading
Loading
+7 −6
Original line number Original line Diff line number Diff line
@@ -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
OpenSSL internally for certificate validation, in both the S/MIME and
SSL/TLS code.
SSL/TLS code.


The negative return value from X509_verify_cert() can only occur if no
A negative return value from X509_verify_cert() can occur if it is invoked
certificate is set in B<ctx> (due to a programming error); if X509_verify_cert()
incurrectly, such as with no certificate set in B<ctx>, or when it is called
twice without reinitialising B<ctx> in between; or if a retry
twice in succession without reinitialising B<ctx> for the second call.
operation is requested during internal lookups (which never happens with
A negative return value can also happen due to internal resource problems or if
standard lookup methods). It is however recommended that application check
a retry operation is requested during internal lookups (which never happens
for <= 0 return value on error.
with standard lookup methods).
Applications must check for <= 0 return value on error.


=head1 BUGS
=head1 BUGS