pub struct OcspRequest<'a> { /* private fields */ }Expand description
A complete version-one OCSPRequest with exact original signed bytes.
Implementations§
Source§impl<'a> OcspRequest<'a>
impl<'a> OcspRequest<'a>
Sourcepub fn authenticate_signature<'q, 'c, 'cert, V: Verify<E>, E: Work>(
&'q self,
signer: &'c Certificate<'cert>,
key: WorkingKey<'cert>,
verifier: &V,
execution: &E,
) -> Result<RequestAuthentication<'q, 'a, 'c, 'cert>, RequestSignatureError<V::Error>>
pub fn authenticate_signature<'q, 'c, 'cert, V: Verify<E>, E: Work>( &'q self, signer: &'c Certificate<'cert>, key: WorkingKey<'cert>, verifier: &V, execution: &E, ) -> Result<RequestAuthentication<'q, 'a, 'c, 'cert>, RequestSignatureError<V::Error>>
Verify the exact original TBSRequest and bind the actual signer SPKI.
RFC6960 §4.1.2 makes signing optional and names mandatory when signed.
Requestor-name binding is reported separately: certificate path, key
usage, name interpretation and server authorization remain with callers.
Included certificates are never automatically selected or trusted.
https://www.rfc-editor.org/rfc/rfc6960#section-4.1.2
Source§impl<'a> OcspRequest<'a>
impl<'a> OcspRequest<'a>
Sourcepub fn nonce<W: Work>(&self, execution: &W) -> Result<Option<RequestNonce<'a>>>
pub fn nonce<W: Work>(&self, execution: &W) -> Result<Option<RequestNonce<'a>>>
Decode the original request-wide nonce with the same RFC9654 kernel as responses. Received legacy sizes 1..128 are readable; generation of new requests must still supply at least 32 strong random octets.
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 known request-wide nonce syntax and preserve unknown critical demands. RFC6960 §4.1.2 makes all specific extensions optional; unknown noncritical values remain in the original model, never silently dropped.
Sourcepub fn bind_response<'q, 'r, 'response, 'd, D: AsnDigest<'d> + ?Sized, W: Work>(
&'q self,
response: SignedResponse<'r, 'response>,
digest: &'d D,
execution: &W,
) -> CallbackResult<BoundResponse<'q, 'a, 'r, 'response>, D::Error>
pub fn bind_response<'q, 'r, 'response, 'd, D: AsnDigest<'d> + ?Sized, W: Work>( &'q self, response: SignedResponse<'r, 'response>, digest: &'d D, execution: &W, ) -> CallbackResult<BoundResponse<'q, 'a, 'r, 'response>, D::Error>
Bind the complete original batch to an already authenticated response. RFC6960 §3.2 requires actual requested-certificate binding. This query proves neither responder authority nor that a found status is Good. On any execution/provider refusal all partial lookup storage is dropped. https://www.rfc-editor.org/rfc/rfc6960#section-3.2
Source§impl<'a> OcspRequest<'a>
impl<'a> OcspRequest<'a>
Sourcepub fn read(parser: &'a Parser, bytes: &'a [u8], base: u64) -> Result<Self>
pub fn read(parser: &'a Parser, bytes: &'a [u8], base: u64) -> Result<Self>
Decode one complete request window. No signing, fetching, randomness, default-budget parser or certificate selection is performed.
Sourcepub fn read_element(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
pub fn read_element(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
Decode an embedded request under DER and its actual producing session. RFC6960 §§4/4.1.1–4.1.2 require DER TBS, explicit wrappers, at least one request, and a requestorName when a signature is present. https://www.rfc-editor.org/rfc/rfc6960#section-4.1.1
Sourcepub fn signed_bytes(&self) -> &'a [u8] ⓘ
pub fn signed_bytes(&self) -> &'a [u8] ⓘ
Exact DER TBSRequest signed by the optional signature, excluding its wrapper.
Sourcepub fn signed_span(&self) -> Span
pub fn signed_span(&self) -> Span
Original whole TBS range.
Sourcepub fn requestor(&self) -> Option<&GeneralName<'a>>
pub fn requestor(&self) -> Option<&GeneralName<'a>>
Original optional requestor name; not an authenticated identity by itself.
Sourcepub fn requests(&self) -> &[RequestEntry<'a>]
pub fn requests(&self) -> &[RequestEntry<'a>]
Every original entry in wire order, including duplicate CertIDs.
Sourcepub fn extensions(&self) -> &Extensions<'a>
pub fn extensions(&self) -> &Extensions<'a>
Request-wide extensions, independently of each entry’s extensions.
Sourcepub fn signature(&self) -> Option<&RequestSignature<'a>>
pub fn signature(&self) -> Option<&RequestSignature<'a>>
Optional original signature; absent never means an authenticated request.
Sourcepub fn execution_in<'op, W: Work>(&self, current: &'op W) -> Execution<'op>where
'a: 'op,
pub fn execution_in<'op, W: Work>(&self, current: &'op W) -> Execution<'op>where
'a: 'op,
Attach this original request to the current operation without scanning, cloning an account, or discarding either operation’s cumulative ceiling.