pub struct BasicResponse<'a> { /* private fields */ }Expand description
BasicOCSPResponse retains the exact signed ResponseData encoding.
Implementations§
Source§impl<'a> BasicResponse<'a>
impl<'a> BasicResponse<'a>
Sourcepub fn nonce<W: Work>(&self, execution: &W) -> Result<Option<&'a [u8]>>
pub fn nonce<W: Work>(&self, execution: &W) -> Result<Option<&'a [u8]>>
Decode a response nonce, retaining the producing parser’s local work and depth ceilings. Received nonce syntax accepts 1..128 octets, including legacy short nonces; this does not relax new-request construction.
Sourcepub fn bind_nonce<W: Work>(
&self,
request: Option<RequestNonce<'_>>,
execution: &W,
) -> Result<NonceBinding>
pub fn bind_nonce<W: Work>( &self, request: Option<RequestNonce<'_>>, execution: &W, ) -> Result<NonceBinding>
Compare the actual request nonce only after authenticating this response. Missing/unsolicited values are preserved for the caller’s replay policy; they are never replaced by a generated or default nonce.
Source§impl<'a> BasicResponse<'a>
impl<'a> BasicResponse<'a>
Sourcepub fn authenticate_signature<'r, V: Verify<E>, D: Digest<E>, E: Work>(
&'r self,
signer: &'r Certificate<'a>,
key: WorkingKey<'a>,
verifier: &V,
digest: &D,
execution: &E,
) -> Result<SignatureAuthentication<'r, 'a>, SignatureError<V::Error, D::Error>>
pub fn authenticate_signature<'r, V: Verify<E>, D: Digest<E>, E: Work>( &'r self, signer: &'r Certificate<'a>, key: WorkingKey<'a>, verifier: &V, digest: &D, execution: &E, ) -> Result<SignatureAuthentication<'r, 'a>, SignatureError<V::Error, D::Error>>
Authenticate exact ResponseData with the actual signer’s bound key.
Included certificates are candidates only. RFC6960 §§4.2.2.2–4.2.2.3
require authorization and status validity beyond this signature fact.
https://www.rfc-editor.org/rfc/rfc6960#section-4.2.2.2
Source§impl<'a> BasicResponse<'a>
impl<'a> BasicResponse<'a>
Sourcepub fn check_extensions<W: Work>(
&self,
execution: &W,
) -> Result<ExtensionProcessing<'a>>
pub fn check_extensions<W: Work>( &self, execution: &W, ) -> Result<ExtensionProcessing<'a>>
Process response-wide critical demands before using any assertion. RFC6960 §4.4 makes optional extension support explicit. This core supports nonce; other optional noncritical values remain opaque. https://www.rfc-editor.org/rfc/rfc6960#section-4.4
Source§impl<'a> BasicResponse<'a>
impl<'a> BasicResponse<'a>
Sourcepub fn responder(&self) -> &ResponderId<'a>
pub fn responder(&self) -> &ResponderId<'a>
Original responder identity, not a resolved signing authority.
Sourcepub fn produced_at(&self) -> Time
pub fn produced_at(&self) -> Time
Time the responder signed this response, not the status update time.
Sourcepub fn responses(&self) -> &[SingleResponse<'a>]
pub fn responses(&self) -> &[SingleResponse<'a>]
Signed assertions in original order; duplicates are not collapsed.
Sourcepub fn extensions(&self) -> &Extensions<'a>
pub fn extensions(&self) -> &Extensions<'a>
Response-wide deferred extensions.
Sourcepub fn signature_algorithm(&self) -> AlgorithmIdentifier<'a>
pub fn signature_algorithm(&self) -> AlgorithmIdentifier<'a>
Signature algorithm selected by the responder.
Sourcepub fn certificates(&self) -> &[Certificate<'a>]
pub fn certificates(&self) -> &[Certificate<'a>]
Untrusted included certificates, not a discovered trust path.
Sourcepub fn signed_bytes(&self) -> &'a [u8] ⓘ
pub fn signed_bytes(&self) -> &'a [u8] ⓘ
Exact original DER ResponseData bytes supplied to signature verification.