pub struct X509<'a> { /* private fields */ }
Expand description
Structure for a x509 certificate
Implementations§
§impl X509<'_>
impl X509<'_>
pub fn serial_number(&self) -> Vec<u8>
pub fn serial_number(&self) -> Vec<u8>
Unique id for certificate issued by a specific CA.
pub fn signature_algorithm(&self) -> String
pub fn signature_algorithm(&self) -> String
Signature algorithm (OID)
pub fn valid_from(&self) -> Vec<u64>
pub fn valid_from(&self) -> Vec<u64>
Start time of certificate validity
pub fn is_ca(&self) -> bool
pub fn rsa_info(&self) -> Option<RsaInfo<'_>>
pub fn rsa_info(&self) -> Option<RsaInfo<'_>>
If the underlying public-key scheme is RSA, return the RSA information.
pub fn check_signature(
&self,
hash: &[u8],
signature: &[u8],
digest: Algorithms
) -> bool
pub fn check_signature( &self, hash: &[u8], signature: &[u8], digest: Algorithms ) -> bool
Try to decrypt the given signature and check if it matches the given hash according to the hash algorithm provided
pub fn verify(&self, ca: &X509<'_>) -> VerificationFlags
pub fn verify(&self, ca: &X509<'_>) -> VerificationFlags
Verify that this certificate has been used to trust the given certificate
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for X509<'a>
impl<'a> !Send for X509<'a>
impl<'a> !Sync for X509<'a>
impl<'a> Unpin for X509<'a>
impl<'a> UnwindSafe for X509<'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