GMime.Certificate¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
created |
r |
The creation date of the certificate. |
|
digest_algo |
r |
The digest algorithm used by the certificate, if known. |
|
r |
The email address of the person or entity. |
||
expires |
r |
The expiration date of the certificate. |
|
fingerprint |
r |
A hex string representing the certificate’s fingerprint. |
|
id_validity |
r |
the validity of the email address, name, and User ID. |
|
issuer_name |
r |
The issuer of the certificate, if known. |
|
issuer_serial |
r |
The issuer of the certificate, if known. |
|
keyid |
r |
The certificate’s key id. |
|
name |
r |
The name of the person or entity. |
|
parent_object |
r |
parent |
|
pubkey_algo |
r |
The public-key algorithm used by the certificate, if known. |
|
trust |
r |
The level of trust assigned to this certificate. |
|
user_id |
r |
The full User ID of the certificate. |
Class Details¶
- class GMime.Certificate(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An object containing useful information about a certificate.
- classmethod new()¶
- Returns:
a new
GMime.Certificate
object.- Return type:
Creates a new
GMime.Certificate
object.
- get_created()¶
- Returns:
the creation date of the certificate’s key or %-1 if unknown.
- Return type:
Get the creation date of the certificate’s key.
- get_created64()¶
- Returns:
the creation date of the certificate’s key or %-1 if unknown.
- Return type:
Get the creation date of the certificate’s key in seconds since the UNIX epoch, represented as a 64-bit signed integer.
- get_digest_algo()¶
- Returns:
the digest algorithm used by the certificate or
GMime.DigestAlgo.DEFAULT
if unspecified.- Return type:
Get the digest algorithm used by the certificate.
- get_email()¶
-
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.
- get_expires()¶
- Returns:
the expiration date of the certificate’s key or %-1 if unknown.
- Return type:
Get the expiration date of the certificate’s key. A value of %0 means the certificate never expires.
- get_expires64()¶
- Returns:
the expiration date of the certificate’s key or %-1 if unknown.
- Return type:
Get the expiration date of the certificate’s key in seconds since the UNIX epoch, represented as a 64-bit signed integer. A value of %0 means the certificate never expires.
- get_fingerprint()¶
-
Get the certificate’s key fingerprint.
- get_id_validity()¶
- Returns:
the identity validity of the certificate.
- Return type:
Get the validity of the certificate’s identity information. This validity applies to the name, email, and user_id fields associated with the certificate.
- get_issuer_name()¶
-
Get the certificate’s issuer name.
- get_issuer_serial()¶
-
Get the certificate’s issuer serial.
- get_key_id()¶
-
Get the certificate’s key id.
- get_name()¶
-
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.
- get_pubkey_algo()¶
- Returns:
the public-key algorithm used by the certificate or
GMime.PubKeyAlgo.DEFAULT
if unspecified.- Return type:
Get the public-key algorithm used by the certificate.
- get_trust()¶
- Returns:
the certificate trust.
- Return type:
Get the certificate trust.
- get_user_id()¶
-
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.
- set_created(created)¶
- Parameters:
created (
int
) – creation date
Set the creation date of the certificate’s key.
- set_digest_algo(algo)¶
- Parameters:
algo (
GMime.DigestAlgo
) – aGMime.DigestAlgo
Set the digest algorithm used by the certificate.
- set_email(email)¶
- Parameters:
email (
str
) – certificate’s email
Set the email address associated with the certificate. (e.g. “jane\`example`.org”)
- set_expires(expires)¶
- Parameters:
expires (
int
) – expiration date
Set the expiration date of the certificate’s key. A value of %0 means the certificate never expires.
- set_fingerprint(fingerprint)¶
- Parameters:
fingerprint (
str
) – fingerprint string
Set the certificate’s key fingerprint.
- set_id_validity(validity)¶
- Parameters:
validity (
GMime.Validity
) – aGMime.Validity
representing the validity of the certificate’s identity information.
Set the validity associated with the certificate’s name, email, and user_id.
- set_issuer_name(issuer_name)¶
- Parameters:
issuer_name (
str
) – certificate’s issuer name
Set the certificate’s issuer name.
- set_issuer_serial(issuer_serial)¶
- Parameters:
issuer_serial (
str
) – certificate’s issuer serial
Set the certificate’s issuer serial.
- set_name(name)¶
- Parameters:
name (
str
) – certificate’s name
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”)
- set_pubkey_algo(algo)¶
- Parameters:
algo (
GMime.PubKeyAlgo
) – aGMime.PubKeyAlgo
Set the public-key algorithm used by the certificate.
- set_trust(trust)¶
- Parameters:
trust (
GMime.Trust
) – aGMime.Trust
value
Set the certificate trust.