GMime.Certificate

g GMime.Certificate GMime.Certificate GObject.Object GObject.Object GObject.Object->GMime.Certificate

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_created ()

get_created64 ()

get_digest_algo ()

get_email ()

get_expires ()

get_expires64 ()

get_fingerprint ()

get_id_validity ()

get_issuer_name ()

get_issuer_serial ()

get_key_id ()

get_name ()

get_pubkey_algo ()

get_trust ()

get_user_id ()

set_created (created)

set_digest_algo (algo)

set_email (email)

set_expires (expires)

set_fingerprint (fingerprint)

set_id_validity (validity)

set_issuer_name (issuer_name)

set_issuer_serial (issuer_serial)

set_key_id (key_id)

set_name (name)

set_pubkey_algo (algo)

set_trust (trust)

set_user_id (user_id)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

created

int

r

The creation date of the certificate.

digest_algo

GMime.DigestAlgo

r

The digest algorithm used by the certificate, if known.

email

str

r

The email address of the person or entity.

expires

int

r

The expiration date of the certificate.

fingerprint

str

r

A hex string representing the certificate’s fingerprint.

id_validity

GMime.Validity

r

the validity of the email address, name, and User ID.

issuer_name

str

r

The issuer of the certificate, if known.

issuer_serial

str

r

The issuer of the certificate, if known.

keyid

str

r

The certificate’s key id.

name

str

r

The name of the person or entity.

parent_object

GObject.Object

r

parent GObject.Object

pubkey_algo

GMime.PubKeyAlgo

r

The public-key algorithm used by the certificate, if known.

trust

GMime.Trust

r

The level of trust assigned to this certificate.

user_id

str

r

The full User ID of the certificate.

Class Details

class GMime.Certificate(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GMime.CertificateClass

An object containing useful information about a certificate.

classmethod new()
Returns:

a new GMime.Certificate object.

Return type:

GMime.Certificate

Creates a new GMime.Certificate object.

get_created()
Returns:

the creation date of the certificate’s key or %-1 if unknown.

Return type:

int

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:

int

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:

GMime.DigestAlgo

Get the digest algorithm used by the certificate.

get_email()
Returns:

the relevant e-mail address, or None if unspecified.

Return type:

str

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:

int

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:

int

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()
Returns:

the certificate’s key fingerprint or None if unspecified.

Return type:

str

Get the certificate’s key fingerprint.

get_id_validity()
Returns:

the identity validity of the certificate.

Return type:

GMime.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.

get_issuer_name()
Returns:

the certificate’s issuer name or None if unspecified.

Return type:

str

Get the certificate’s issuer name.

get_issuer_serial()
Returns:

the certificate’s issuer serial or None if unspecified.

Return type:

str

Get the certificate’s issuer serial.

get_key_id()
Returns:

the certificate’s key id or None if unspecified.

Return type:

str

Get the certificate’s key id.

get_name()
Returns:

the the relevant name or None if unspecified.

Return type:

str

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:

GMime.PubKeyAlgo

Get the public-key algorithm used by the certificate.

get_trust()
Returns:

the certificate trust.

Return type:

GMime.Trust

Get the certificate trust.

get_user_id()
Returns:

the relevant User ID or None if unspecified.

Return type:

str

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) – a GMime.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) – a GMime.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_key_id(key_id)
Parameters:

key_id (str) – key id

Set the certificate’s key id.

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) – a GMime.PubKeyAlgo

Set the public-key algorithm used by the certificate.

set_trust(trust)
Parameters:

trust (GMime.Trust) – a GMime.Trust value

Set the certificate trust.

set_user_id(user_id)
Parameters:

user_id (str) – the full User ID for a certificate

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>”)