openssl ocsp program documented at http://www.openssl.org/docs/apps/ocsp.html requires that the client send the certificate AND the CA certificate to the ocsp resopnder. RFC 2560 for OCSP however, does not require that. Shouldn't the OCSP responder be preconfigured with the CA certificate a开发者_开发知识库nd be able to locate the particular CA from the certificate that is sent to it by the client? Thanks for any answers
The openssl ocsp application does not really send the entire issuer certificate to the responder. If you look at the definition of CertID (RFC 2560)
CertID ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
issuerNameHash OCTET STRING, -- Hash of Issuer's DN
issuerKeyHash OCTET STRING, -- Hash of Issuers public key
serialNumber CertificateSerialNumber }
there are two issuer-related fields, issuerNameHash and issuerKeyHash. The openssl ocsp command takes the entire issuer certificate for convenience and uses that certificate to produce these two fields for the final request.
The OCSP responder cannot be pre-configured for a single CA certificate in general since most CAs issue several sub-CA certificates for their "root certificate" - i.e. a CA normally has a single CA certificate root issued in its name and issues several sub-CA certificates under this root certificate on its own, e.g. sub 1, sub 2 and so on. Apart from administrational or semantical implications this has the additional benefit that a key compromise for one of the sub CAs is less severe than for the root certificate. Everyday business is done in the name of the sub CAs, whereas the root key is just used once in a while for renewing the sub CA certificates and can kept as safe as possible for the rest of the time.
Due to these sub-CAs the OCSP responder cannot distinguish easily which sub CA issued a certificate that is to be checked and would need that information to determine for which client certificate revocation needs to be checked.
You could argue that the responder could determine this on the serial number alone - but this is why only the combination of issuer and serial number can uniquely identify a certificate: It is possible that two CAs (in our scenario sub CAs) issue certificates with the same serial number. That's why the protocol requires clients to send the issuer information as well.
精彩评论