Struct botan::Certificate [−][src]
pub struct Certificate { /* fields omitted */ }
X.509 certificate
Methods
impl Certificate
[src]
impl Certificate
pub fn load(data: &[u8]) -> Result<Certificate>
[src]
pub fn load(data: &[u8]) -> Result<Certificate>
Load a X.509 certificate from DER or PEM representation
pub fn from_file(fsname: &str) -> Result<Certificate>
[src]
pub fn from_file(fsname: &str) -> Result<Certificate>
Read an X.509 certificate from a file
pub fn serial_number(&self) -> Result<Vec<u8>>
[src]
pub fn serial_number(&self) -> Result<Vec<u8>>
Return the serial number of this certificate
pub fn fingerprint(&self, hash: &str) -> Result<Vec<u8>>
[src]
pub fn fingerprint(&self, hash: &str) -> Result<Vec<u8>>
Return the fingerprint of this certificate
pub fn duplicate(&self) -> Result<Certificate>
[src]
pub fn duplicate(&self) -> Result<Certificate>
Duplicate the certificate object
Since certificate objects are immutable, duplication just involves atomic incrementing a reference count, so is quite cheap
Return the authority key id, if set
pub fn subject_key_id(&self) -> Result<Vec<u8>>
[src]
pub fn subject_key_id(&self) -> Result<Vec<u8>>
Return the subject key id, if set
pub fn public_key_bits(&self) -> Result<Vec<u8>>
[src]
pub fn public_key_bits(&self) -> Result<Vec<u8>>
Return the byte representation of the public key
pub fn public_key(&self) -> Result<Pubkey>
[src]
pub fn public_key(&self) -> Result<Pubkey>
Return the public key included in this certificate
pub fn to_string(&self) -> Result<String>
[src]
pub fn to_string(&self) -> Result<String>
Return a free-form string representation of this certificate
pub fn allows_usage(&self, usage: CertUsage) -> Result<bool>
[src]
pub fn allows_usage(&self, usage: CertUsage) -> Result<bool>
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]
pub fn verify(
&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]
pub fn matches_hostname(&self, hostname: &str) -> Result<bool>
Return true if the provided hostname is valid for this certificate
Trait Implementations
impl Debug for Certificate
[src]
impl Debug for Certificate
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for Certificate
[src]
impl Drop for Certificate
impl Clone for Certificate
[src]
impl Clone for Certificate
fn clone(&self) -> Certificate
[src]
fn clone(&self) -> Certificate
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !Send for Certificate
impl !Send for Certificate
impl !Sync for Certificate
impl !Sync for Certificate