>> However, after discovering X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE
>> error, OpenSSL internal_verify() stops calling the callback due to this
>> code in crypto/x509/x509_vfy.c:

>The reason for that is that any "errors" after that point are pretty
>bogus. You only get that error if the certificate "chain" consists of
>one single certificate and it is not self signed. That means its
>signature can't be verified and it could contain anything.

By the same logic, further verification steps should not be done
also in case when issuer certificate is there, but can not be found
in trust store. But they are performed. In fact, this is the duty of
callback function to decide which errors are acceptable and which not.


>In our rare case, errors such as "expired certificate" are meaningful
>even if the certificate signature cannot be verified.
>
>Please consider reporting all errors to the callback as long as it does
>no harm.

While I agree that this is a bug, the internal_verify() should not be
changed, because many implementations are relying on this "feature".
For example, Apache mod_ssl users who have configured their
"SSLVerifyClient optional_no_ca" and are using certificates only as a
public key transport, will suddenly experience authentication failures
because of expired certificates.

New X509_verify_cert() and internal_verify() alternatives should be
provided that fix shortcomings of current ones.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to