• Robert Relyea's avatar
    Bug 1672291 libpkix OCSP failures on SHA1 self-signed root certs when SHA1... · b0b7f9e9
    Robert Relyea authored
    Bug 1672291 libpkix OCSP failures on SHA1 self-signed root certs when SHA1 signatures are disabled. r=mt
    
    When libpkix is checking an OCSP cert, it can't use the passed in set of trust anchors as a base because only the single root that signed the leaf can sign the OCSP request. As a result it actually checks the signature of the self-signed root when processing an OCSP request. This fails of the root cert signature is invalid for any reason (including it's a sha1 self-signed root cert and we've disabled sha1 signatures (say, by policy)).
    
    Further investigation indicates the difference between our classic code and the current code is the classic code only checks OCSP responses on leaf certs. In the real world, those responses are signed by intermediate certificates (who won't have sha1 signed certificates anymore), so our signature processing works just fine. pkix checks OCSP on the intermediate certificates as well, which are signed by the root cert. In this case the root cert is a chain of 1, and is effectively a leaf. This patch updates the OCSP response code to not check the signatures on the single cert if that cert is a selfsigned root cert. This requires bug 391476 so we still do the other validation checking on the certs (making sure it's trusted as a CA).
    
    Differential Revision: https://phabricator.services.mozilla.com/D94661
    b0b7f9e9
Name
Last commit
Last update
..
ssl.sh Loading commit data...
ssl_dist_stress.sh Loading commit data...
sslauth.txt Loading commit data...
sslcov.txt Loading commit data...
sslpolicy.txt Loading commit data...
sslreq.dat Loading commit data...
sslreq.txt Loading commit data...
sslstress.txt Loading commit data...