Skip to main content

BasicResponse

Struct BasicResponse 

Source
pub struct BasicResponse<'a> { /* private fields */ }
Expand description

BasicOCSPResponse retains the exact signed ResponseData encoding.

Implementations§

Source§

impl<'a> BasicResponse<'a>

Source

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.

Source

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>

Source

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>

Source

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>

Source

pub fn responder(&self) -> &ResponderId<'a>

Original responder identity, not a resolved signing authority.

Source

pub fn produced_at(&self) -> Time

Time the responder signed this response, not the status update time.

Source

pub fn responses(&self) -> &[SingleResponse<'a>]

Signed assertions in original order; duplicates are not collapsed.

Source

pub fn extensions(&self) -> &Extensions<'a>

Response-wide deferred extensions.

Source

pub fn signature_algorithm(&self) -> AlgorithmIdentifier<'a>

Signature algorithm selected by the responder.

Source

pub fn signature(&self) -> BitString<'a>

Original signature BIT STRING.

Source

pub fn certificates(&self) -> &[Certificate<'a>]

Untrusted included certificates, not a discovered trust path.

Source

pub fn signed_bytes(&self) -> &'a [u8] ⓘ

Exact original DER ResponseData bytes supplied to signature verification.

Source

pub fn as_bytes(&self) -> &'a [u8] ⓘ

Original DER BasicOCSPResponse bytes.

Source

pub fn span(&self) -> Span

Original basic-response location inside the payload OCTET STRING.

Trait Implementations§

Source§

impl<'a> Debug for BasicResponse<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for BasicResponse<'a>

§

impl<'a> !RefUnwindSafe for BasicResponse<'a>

§

impl<'a> !Send for BasicResponse<'a>

§

impl<'a> !Sync for BasicResponse<'a>

§

impl<'a> !UnwindSafe for BasicResponse<'a>

§

impl<'a> Unpin for BasicResponse<'a>

§

impl<'a> UnsafeUnpin for BasicResponse<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.