Struct botan::Certificate [−][src]
X.509 certificate
Implementations
impl Certificate
[src]
pub fn load(data: &[u8]) -> Result<Certificate>
[src]
Load a X.509 certificate from DER or PEM representation
pub fn from_file(fsname: &str) -> Result<Certificate>
[src]
Read an X.509 certificate from a file
pub fn serial_number(&self) -> Result<Vec<u8>>
[src]
Return the serial number of this certificate
pub fn fingerprint(&self, hash: &str) -> Result<Vec<u8>>
[src]
Return the fingerprint of this certificate
pub fn duplicate(&self) -> Result<Certificate>
[src]
Duplicate the certificate object
Since certificate objects are immutable, duplication just involves atomic incrementing a reference count, so is quite cheap
pub fn authority_key_id(&self) -> Result<Vec<u8>>
[src]
Return the authority key id, if set
pub fn subject_key_id(&self) -> Result<Vec<u8>>
[src]
Return the subject key id, if set
pub fn public_key_bits(&self) -> Result<Vec<u8>>
[src]
Return the byte representation of the public key
pub fn public_key(&self) -> Result<Pubkey>
[src]
Return the public key included in this certificate
pub fn to_string(&self) -> Result<String>
[src]
Return a free-form string representation of this certificate
pub fn allows_usage(&self, usage: CertUsage) -> Result<bool>
[src]
Test if the certificate is allowed for a particular usage
pub fn verify(
&self,
intermediates: &[&Certificate],
trusted: &[&Certificate],
trusted_path: Option<&str>,
hostname: Option<&str>,
reference_time: Option<u64>
) -> Result<CertValidationStatus>
[src]
&self,
intermediates: &[&Certificate],
trusted: &[&Certificate],
trusted_path: Option<&str>,
hostname: Option<&str>,
reference_time: Option<u64>
) -> Result<CertValidationStatus>
Attempt to verify this certificate
pub fn matches_hostname(&self, hostname: &str) -> Result<bool>
[src]
Return true if the provided hostname is valid for this certificate
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 Drop 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<T> From<T> for T
[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>,