pub struct OcspCertId { /* private fields */ }Expand description
Certificate identifier for OCSP (OCSP_CERTID*).
Created from a subject certificate and its issuer with OcspCertId::from_cert.
Add to a request with OcspRequest::add_cert_id, or use to look up a status
in a response with OcspBasicResp::find_status.
Clone is implemented via OCSP_CERTID_dup.
Implementations§
Source§impl OcspCertId
impl OcspCertId
Sourcepub fn new() -> Result<Self, ErrorStack>
pub fn new() -> Result<Self, ErrorStack>
Allocate a new, empty OCSP_CERTID.
The returned object has all fields zeroed. Use OcspCertId::from_cert
to build a fully populated cert ID from a subject certificate and its
issuer instead.
§Errors
Returns Err if OpenSSL fails to allocate memory.
Sourcepub fn from_cert(
digest: Option<&DigestAlg>,
subject: &X509,
issuer: &X509,
) -> Result<Self, ErrorStack>
pub fn from_cert( digest: Option<&DigestAlg>, subject: &X509, issuer: &X509, ) -> Result<Self, ErrorStack>
Build a cert ID from a subject certificate and its direct issuer.
digest is the hash algorithm used to hash the issuer name and key
(default: SHA-1 when None, per RFC 6960). SHA-1 is required by most
deployed OCSP responders; pass Some(sha256_alg) only when the responder
is known to support it.