pub struct CertificateInner<P: Profile = Rfc5280> {
pub tbs_certificate: TbsCertificateInner<P>,
pub signature_algorithm: AlgorithmIdentifierOwned,
pub signature: BitString,
}Expand description
X.509 certificates are defined in RFC 5280 Section 4.1.
Certificate ::= SEQUENCE {
tbsCertificate TBSCertificate,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}Fields§
§tbs_certificate: TbsCertificateInner<P>§signature_algorithm: AlgorithmIdentifierOwned§signature: BitStringImplementations§
Source§impl<P: Profile> CertificateInner<P>
impl<P: Profile> CertificateInner<P>
Sourcepub fn load_pem_chain(input: &[u8]) -> Result<Vec<Self>, Error>
pub fn load_pem_chain(input: &[u8]) -> Result<Vec<Self>, Error>
Parse a chain of pem-encoded certificates from a slice.
Returns the list of certificates.
Trait Implementations§
Source§impl<P: Clone + Profile> Clone for CertificateInner<P>
impl<P: Clone + Profile> Clone for CertificateInner<P>
Source§fn clone(&self) -> CertificateInner<P>
fn clone(&self) -> CertificateInner<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'__der_lifetime, P: Profile> DecodeValue<'__der_lifetime> for CertificateInner<P>
impl<'__der_lifetime, P: Profile> DecodeValue<'__der_lifetime> for CertificateInner<P>
Source§fn decode_value<R: Reader<'__der_lifetime>>(
reader: &mut R,
header: Header,
) -> Result<Self>
fn decode_value<R: Reader<'__der_lifetime>>( reader: &mut R, header: Header, ) -> Result<Self>
Attempt to decode this message using the provided [
Reader].Source§impl<'__der_lifetime, P: Profile> EncodeValue for CertificateInner<P>
impl<'__der_lifetime, P: Profile> EncodeValue for CertificateInner<P>
Source§impl<P: PartialEq + Profile> PartialEq for CertificateInner<P>
impl<P: PartialEq + Profile> PartialEq for CertificateInner<P>
Source§fn eq(&self, other: &CertificateInner<P>) -> bool
fn eq(&self, other: &CertificateInner<P>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<P: Profile> PemLabel for CertificateInner<P>
Available on crate feature pem only.
impl<P: Profile> PemLabel for CertificateInner<P>
Available on crate feature
pem only.Source§impl ValueOrd for CertificateInner
impl ValueOrd for CertificateInner
impl<P: Eq + Profile> Eq for CertificateInner<P>
impl<'__der_lifetime, P: Profile> Sequence<'__der_lifetime> for CertificateInner<P>
impl<P: Profile> StructuralPartialEq for CertificateInner<P>
Auto Trait Implementations§
impl<P> Freeze for CertificateInner<P>
impl<P> RefUnwindSafe for CertificateInner<P>where
P: RefUnwindSafe,
impl<P> Send for CertificateInner<P>where
P: Send,
impl<P> Sync for CertificateInner<P>where
P: Sync,
impl<P> Unpin for CertificateInner<P>where
P: Unpin,
impl<P> UnsafeUnpin for CertificateInner<P>
impl<P> UnwindSafe for CertificateInner<P>where
P: UnwindSafe,
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
§impl<'a, T> Choice<'a> for Twhere
T: Decode<'a> + FixedTag,
impl<'a, T> Choice<'a> for Twhere
T: Decode<'a> + FixedTag,
§fn can_decode(tag: Tag) -> bool
fn can_decode(tag: Tag) -> bool
Is the provided [
Tag] decodable as a variant of this CHOICE?Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
§impl<T> DecodePem for Twhere
T: DecodeOwned + PemLabel,
impl<T> DecodePem for Twhere
T: DecodeOwned + PemLabel,
§impl<T> DerOrd for Twhere
T: EncodeValue + ValueOrd + Tagged,
impl<T> DerOrd for Twhere
T: EncodeValue + ValueOrd + Tagged,
§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
§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.
§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].
§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.
§fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length, Error>
fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length, Error>
Encode this message as ASN.1 DER, appending it to the provided
byte vector.
§impl<T> EncodePem for Twhere
T: Encode + PemLabel,
impl<T> EncodePem for Twhere
T: Encode + PemLabel,
§fn to_pem(&self, line_ending: LineEnding) -> Result<String, Error>
fn to_pem(&self, line_ending: LineEnding) -> Result<String, Error>
Try to encode this type as PEM.