pub struct Request {
pub req_cert: CertId,
pub single_request_extensions: Option<Extensions>,
}
Expand description
Request structure as defined in RFC 6960 Section 4.1.1.
Request ::= SEQUENCE {
reqCert CertID,
singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
Fields§
§req_cert: CertId
§single_request_extensions: Option<Extensions>
Implementations§
Source§impl Request
impl Request
Sourcepub fn new(req_cert: CertId) -> Self
Available on crate feature builder
only.
pub fn new(req_cert: CertId) -> Self
builder
only.Returns a new Request
with the specified CertID
Sourcepub fn from_issuer<D>(
issuer: &Certificate,
serial_number: SerialNumber,
) -> Result<Self, Error>where
D: Digest + AssociatedOid,
Available on crate feature builder
only.
pub fn from_issuer<D>(
issuer: &Certificate,
serial_number: SerialNumber,
) -> Result<Self, Error>where
D: Digest + AssociatedOid,
builder
only.Generates a CertID
by running the issuer’s subject and key through the specified
Digest
.
Sourcepub fn from_cert<D>(
issuer: &Certificate,
cert: &Certificate,
) -> Result<Self, Error>where
D: Digest + AssociatedOid,
Available on crate feature builder
only.
pub fn from_cert<D>(
issuer: &Certificate,
cert: &Certificate,
) -> Result<Self, Error>where
D: Digest + AssociatedOid,
builder
only.Generates a CertID
by running the issuer’s subject and key through the specified
Digest
and pulls the serial from cert
. This does not ensure that cert
is actually
issued by issuer
.
Sourcepub fn with_extension(self, ext: impl AsExtension) -> Result<Self, Error>
Available on crate feature builder
only.
pub fn with_extension(self, ext: impl AsExtension) -> Result<Self, Error>
builder
only.Adds a single request extension as specified in RFC 6960 Section 4.4. Errors when the extension encoding fails.
Trait Implementations§
Source§impl<'__der_lifetime> DecodeValue<'__der_lifetime> for Request
impl<'__der_lifetime> DecodeValue<'__der_lifetime> for Request
Source§impl<'__der_lifetime> EncodeValue for Request
impl<'__der_lifetime> EncodeValue for Request
impl Eq for Request
impl<'__der_lifetime> Sequence<'__der_lifetime> for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
Source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.