Struct cryptographic_message_syntax::Certificate [−][src]
Defines an X.509 certificate used for signing data.
Fields
public_key: CertificatePublicKeyThe public key for this certificate.
Implementations
impl Certificate[src]
pub fn from_parsed_asn1(cert: Certificate) -> Result<Self, CmsError>[src]
Obtain an instance from an already parsed ASN.1 data structure.
pub fn from_der(data: &[u8]) -> Result<Self, CmsError>[src]
pub fn from_pem(data: &[u8]) -> Result<Self, CmsError>[src]
pub fn serial_number(&self) -> &Integer[src]
The serial number of this certificate.
(Used for identification purposes.)
pub fn subject(&self) -> &Name[src]
The subject of this certificate.
(Used for identification purposes.)
pub fn subject_dn(&self) -> Result<RelativeDistinguishedName, CmsError>[src]
Obtain the subject as a parsed object.
pub fn issuer(&self) -> &Name[src]
The issuer of this certificate.
(Used for identification purposes.)
pub fn issuer_dn(&self) -> Result<RelativeDistinguishedName, CmsError>[src]
Obtain the issuer as a parsed object.
pub fn public_key(&self) -> &CertificatePublicKey[src]
Obtain the public key associated with this certificate.
The public keys gives you access to the pieces needed to perform cryptographic signature verification.
pub fn raw_certificate(&self) -> &Certificate[src]
Obtain the parsed certificate data structure backing this instance.
pub fn as_ber(&self) -> Result<Vec<u8>, CmsError>[src]
Serialize this certificate to BER.
pub fn as_der(&self) -> Result<Vec<u8>, CmsError>[src]
Serialize this certificate to DER.
pub fn as_pem(&self) -> Result<String, CmsError>[src]
Serialize this certificate to PEM.
Trait Implementations
impl Clone for Certificate[src]
fn clone(&self) -> Certificate[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Certificate[src]
impl Eq for Certificate[src]
impl From<Certificate> for IssuerAndSerialNumber[src]
fn from(cert: Certificate) -> Self[src]
impl PartialEq<Certificate> for Certificate[src]
fn eq(&self, other: &Certificate) -> bool[src]
fn ne(&self, other: &Certificate) -> bool[src]
impl StructuralEq for Certificate[src]
impl StructuralPartialEq for Certificate[src]
impl TryFrom<&'_ Certificate> for Certificate[src]
type Error = CmsError
The type returned in the event of a conversion error.
fn try_from(cert: &Certificate) -> Result<Self, Self::Error>[src]
impl TryFrom<&'_ CertificateChoices> for Certificate[src]
Auto Trait Implementations
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnwindSafe for Certificate
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,