pub struct CertChainRef<'a> { /* private fields */ }Available on crate feature
manifest only.Expand description
A reference to a byte slice that is expected to be a valid sequence of DER-encoded X.509 certificates.
This is used to store a chain of certificates in an Image4 manifests without actually parsing them. There are two reasons for this:
- The library currently uses the
x509_certcrate to decode the certificates and that means the original signed TBS certificates are lost when a manifest is decoded. Verifying the manifest’s certificate chain isn’t possible in that case. - Parsing the certificates requires processing time and memory. There is no reason to do this, for example, when all you want to do is to encode them back into DER and write to another file.
Implementations§
Source§impl<'a> CertChainRef<'a>
impl<'a> CertChainRef<'a>
Source§impl CertChainRef<'_>
impl CertChainRef<'_>
Sourcepub fn decode_body(&self) -> Result<Vec<Certificate>>
Available on crate feature x509-cert only.
pub fn decode_body(&self) -> Result<Vec<Certificate>>
x509-cert only.Decodes the body as a vector of Certificates.
Source§impl CertChainRef<'_>
impl CertChainRef<'_>
Trait Implementations§
Source§impl<'a> Clone for CertChainRef<'a>
impl<'a> Clone for CertChainRef<'a>
Source§fn clone(&self) -> CertChainRef<'a>
fn clone(&self) -> CertChainRef<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CertChainRef<'a>
impl<'a> Debug for CertChainRef<'a>
Source§impl<'a> DecodeValue<'a> for CertChainRef<'a>
impl<'a> DecodeValue<'a> for CertChainRef<'a>
Source§impl EncodeValue for CertChainRef<'_>
impl EncodeValue for CertChainRef<'_>
Source§impl<'a> From<&'a CertChain> for CertChainRef<'a>
Available on crate feature alloc only.
impl<'a> From<&'a CertChain> for CertChainRef<'a>
Available on crate feature
alloc only.Source§impl From<&CertChainRef<'_>> for CertChain
Available on crate feature alloc only.
impl From<&CertChainRef<'_>> for CertChain
Available on crate feature
alloc only.Source§fn from(value: &CertChainRef<'_>) -> Self
fn from(value: &CertChainRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<CertChainRef<'_>> for CertChain
Available on crate feature alloc only.
impl From<CertChainRef<'_>> for CertChain
Available on crate feature
alloc only.Source§fn from(value: CertChainRef<'_>) -> Self
fn from(value: CertChainRef<'_>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CertChainRef<'_>
impl PartialEq for CertChainRef<'_>
Source§impl<'a> RefToOwned<'a> for CertChainRef<'a>
Available on crate feature alloc only.
impl<'a> RefToOwned<'a> for CertChainRef<'a>
Available on crate feature
alloc only.impl<'a> Eq for CertChainRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for CertChainRef<'a>
impl<'a> RefUnwindSafe for CertChainRef<'a>
impl<'a> Send for CertChainRef<'a>
impl<'a> Sync for CertChainRef<'a>
impl<'a> Unpin for CertChainRef<'a>
impl<'a> UnwindSafe for CertChainRef<'a>
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.