OCSP (RFC 6960): the request of the status of a certificate, the reading of a response, and the verification of its responder.
The request identifies the certificate by SHA-1 hashes of the name and of the key of its issuer, as the lightweight profile requires (RFC 5019, 2.1.1) and as responders expect: an identifier, not a signature. It has no nonce: the responses of the seals are kept, and the freshness rules of Revocation, not a nonce, tell whether one is current.
A response is signed by the CA that issued the certificate, or by a responder that CA delegated (RFC 6960, 4.2.2.2): a certificate issued directly by it, of extended key usage id-kp-OCSPSigning. The delegated responder must carry id-pkix-ocsp-nocheck (4.2.2.2.1): this library does not check the revocation of responders.
| Methods | ||
|---|---|---|
public
static
|
buildRequest(X509Cert $certificate, X509Cert $issuer)
|
# |
public
static
|
read($data): array
|
# |
public
static
|
publicKeyBits(X509Cert $certificate)
|
# |
public
static
|
sources(array $response): array
|
# |
| Constants | |||
|---|---|---|---|
public
|
BASIC_RESPONSE = '1.3.6.1.5.5.7.48.1.1'
|
# | |
public
|
NO_CHECK = '1.3.6.1.5.5.7.48.1.5'
|
# | |
public
|
ARCHIVE_CUTOFF = '1.3.6.1.5.5.7.48.1.6'
|
# | |
public
|
OCSP_SIGNING = '1.3.6.1.5.5.7.3.9'
|
# | |
public
|
EXTENDED_KEY_USAGE = '2.5.29.37'
|
# | |
public
|
REASON_CODE = '2.5.29.21'
|
# | |
public
|
CERT_ID_DIGESTS = [
Pkix::OID_SHA1 => 'sha1',
Pkix::OID_SHA256 => 'sha256',
Pkix::OID_SHA384 => 'sha384',
Pkix::OID_SHA512 => 'sha512',
]
|
# | |
public
|
RESPONSE_STATUS = [
'successful',
'malformedRequest',
'internalError',
'tryLater',
'(4)',
'sigRequired',
'unauthorized',
]
|
# | |