pub struct Cert {Show 13 fields
pub id: ShortId,
pub kind: CertKind,
pub key: Option<SecretDocument>,
pub pem_chain: Vec<u8>,
pub pem_key: Option<Vec<u8>>,
pub fingerprint: String,
pub issuer: String,
pub root_cert: Option<String>,
pub san: Vec<SubjectName>,
pub not_after: ASN1Time,
pub not_before: ASN1Time,
pub is_ca: bool,
pub metadata: Option<CertMetadata>,
}
Fields§
§id: ShortId
§kind: CertKind
§key: Option<SecretDocument>
§pem_chain: Vec<u8>
§pem_key: Option<Vec<u8>>
§fingerprint: String
§issuer: String
§root_cert: Option<String>
§san: Vec<SubjectName>
§not_after: ASN1Time
§not_before: ASN1Time
§is_ca: bool
§metadata: Option<CertMetadata>
Implementations§
source§impl Cert
impl Cert
pub fn id(&self) -> ShortId
pub fn info(&self) -> CertInfo
pub fn is_valid(&self) -> bool
pub fn has_subject_name(&self, name: &SubjectName) -> bool
pub fn new( kind: CertKind, pem_chain: Vec<u8>, pem_key: Option<Vec<u8>> ) -> Result<Self, Error>
pub fn new_ca() -> Result<Self, Error>
pub fn new_self_signed(san: &[SubjectName], ca: &Cert) -> Result<Self, Error>
pub fn certified_key(&self) -> Result<CertifiedKey, Error>
pub fn certificates(&self) -> Result<Vec<CertificateDer<'static>>, Error>
Trait Implementations§
source§impl PartialEq for Cert
impl PartialEq for Cert
source§impl PartialOrd for Cert
impl PartialOrd for Cert
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Cert
Auto Trait Implementations§
impl Freeze for Cert
impl RefUnwindSafe for Cert
impl Send for Cert
impl Sync for Cert
impl Unpin for Cert
impl UnwindSafe for Cert
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.