Trait gmime::CertificateExt [−][src]
pub trait CertificateExt { fn get_created(&self) -> c_long; fn get_digest_algo(&self) -> DigestAlgo; fn get_email(&self) -> Option<String>; fn get_expires(&self) -> c_long; fn get_fingerprint(&self) -> Option<String>; fn get_id_validity(&self) -> Validity; fn get_issuer_name(&self) -> Option<String>; fn get_issuer_serial(&self) -> Option<String>; fn get_key_id(&self) -> Option<String>; fn get_name(&self) -> Option<String>; fn get_pubkey_algo(&self) -> PubKeyAlgo; fn get_trust(&self) -> Trust; fn get_user_id(&self) -> Option<String>; fn set_created(&self, created: c_long); fn set_digest_algo(&self, algo: DigestAlgo); fn set_email(&self, email: &str); fn set_expires(&self, expires: c_long); fn set_fingerprint(&self, fingerprint: &str); fn set_id_validity(&self, validity: Validity); fn set_issuer_name(&self, issuer_name: &str); fn set_issuer_serial(&self, issuer_serial: &str); fn set_key_id(&self, key_id: &str); fn set_name(&self, name: &str); fn set_pubkey_algo(&self, algo: PubKeyAlgo); fn set_trust(&self, trust: Trust); fn set_user_id(&self, user_id: &str); }
Required Methods
fn get_created(&self) -> c_long
Get the creation date of the certificate's key.
Returns
the creation date of the certificate's key or %-1 if unknown.
fn get_digest_algo(&self) -> DigestAlgo
Get the digest algorithm used by the certificate.
Returns
the digest algorithm used by the certificate or
DigestAlgo::Default
if unspecified.
fn get_email(&self) -> Option<String>
Get the email address associated with the certificate. If the certificate contains more than one email address with different validities, the email address with the highest validity is returned. If more than one email address appears in the certificate with the same (highest) validity, the first such email address will be returned.
Returns
the relevant e-mail address, or None
if unspecified.
fn get_expires(&self) -> c_long
Get the expiration date of the certificate's key.
Returns
the expiration date of the certificate's key or %-1 if unknown.
fn get_fingerprint(&self) -> Option<String>
Get the certificate's key fingerprint.
Returns
the certificate's key fingerprint or None
if unspecified.
fn get_id_validity(&self) -> Validity
Get the validity of the certificate's identity information. This validity applies to the name, email, and user_id fields associated with the certificate.
Returns
the identity validity of the certificate.
fn get_issuer_name(&self) -> Option<String>
fn get_issuer_serial(&self) -> Option<String>
Get the certificate's issuer serial.
Returns
the certificate's issuer serial or None
if unspecified.
fn get_key_id(&self) -> Option<String>
fn get_name(&self) -> Option<String>
Get the name associated with the certificate. For email certificates, this is usually the name of the person who controls the certificate (encoded in UTF-8). If the certificate contains more than one name with different validities, the name with the highest validity is returned. If more than one name appears in the certificate with the same (highest) validity, the first such name will be returned.
Returns
the the relevant name or None
if unspecified.
fn get_pubkey_algo(&self) -> PubKeyAlgo
Get the public-key algorithm used by the certificate.
Returns
the public-key algorithm used by the certificate or
PubKeyAlgo::Default
if unspecified.
fn get_trust(&self) -> Trust
fn get_user_id(&self) -> Option<String>
Get the certificate's full User ID. If the certificate contains more than one User ID with different validities, the User ID with the highest validity is returned. If more than one User ID appears in the certificate with the same (highest) validity, the first such User ID will be returned.
Returns
the relevant User ID or None
if unspecified.
fn set_created(&self, created: c_long)
fn set_digest_algo(&self, algo: DigestAlgo)
fn set_email(&self, email: &str)
Set the email address associated with the certificate. (e.g. "jane@example.org")
email
certificate's email
fn set_expires(&self, expires: c_long)
fn set_fingerprint(&self, fingerprint: &str)
fn set_id_validity(&self, validity: Validity)
Set the validity associated with the certificate's name, email, and user_id.
validity
a Validity
representing the validity of the certificate's identity information.
fn set_issuer_name(&self, issuer_name: &str)
fn set_issuer_serial(&self, issuer_serial: &str)
fn set_key_id(&self, key_id: &str)
fn set_name(&self, name: &str)
Set the name associated with the certificate. For email certificates, this is usually the name of the person who controls the certificate (encoded in UTF-8). (e.g. "Jane Doe")
name
certificate's name
fn set_pubkey_algo(&self, algo: PubKeyAlgo)
fn set_trust(&self, trust: Trust)
fn set_user_id(&self, user_id: &str)
Set the certificate's full User ID. By convention, this is usually a mail name-addr as described in RFC 5322. (e.g. "Jane Doe <jane@example.org>")
user_id
the full User ID for a certificate
Implementors
impl<O: IsA<Certificate>> CertificateExt for O