Gcr.Pkcs11Certificate

g GObject.GInterface GObject.GInterface Gcr.Certificate Gcr.Certificate GObject.GInterface->Gcr.Certificate GObject.Object GObject.Object Gck.Object Gck.Object GObject.Object->Gck.Object Gcr.Pkcs11Certificate Gcr.Pkcs11Certificate Gck.Object->Gcr.Pkcs11Certificate Gcr.Certificate->Gcr.Pkcs11Certificate

Subclasses:

None

Methods

Inherited:

Gck.Object (27), GObject.Object (37), Gcr.Certificate (25)

Structs:

GObject.ObjectClass (5)

class

lookup_issuer (certificate, cancellable)

class

lookup_issuer_async (certificate, cancellable, callback, *user_data)

class

lookup_issuer_finish (result)

class

new_from_uri (pkcs11_uri, cancellable)

class

new_from_uri_async (pkcs11_uri, cancellable, callback, *user_data)

class

new_from_uri_finish (result)

get_attributes ()

Virtual Methods

Inherited:

GObject.Object (7), Gcr.Certificate (1)

Properties

Inherited:

Gck.Object (3), Gcr.Certificate (5)

Name

Type

Flags

Short Description

attributes

Gck.Attributes

r/w/co

The data displayed in the renderer

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Gck.Object

r

Class Details

class Gcr.Pkcs11Certificate(**kwargs)
Bases:

Gck.Object, Gcr.Certificate

Abstract:

No

Structure:

Gcr.Pkcs11CertificateClass

A certificate loaded from a PKCS#11 storage. It is also a valid [class`Gck`.Object] and can be used as such.

Use [func`Gcr`.Pkcs11Certificate.lookup_issuer] to lookup the issuer of a given certificate in the PKCS#11 store.

Various common PKCS#11 certificate attributes are automatically loaded and are available via [method`Gcr`.Pkcs11Certificate.get_attributes].

classmethod lookup_issuer(certificate, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

a new Gcr.Pkcs11Certificate, or None

Return type:

Gcr.Certificate or None

Lookup a the issuer of a certificate in the PKCS#11 storage. The lookup is done using the issuer DN of the certificate. No certificate chain verification is done. Use a crypto library to make trust decisions.

This call may block, see [func`Gcr`.Pkcs11Certificate.lookup_issuer] for the non-blocking version.

Will return None if no issuer certificate is found. Use error to determine if an error occurred.

classmethod lookup_issuer_async(certificate, cancellable, callback, *user_data)[source]
Parameters:

Lookup a the issuer of a certificate in the PKCS#11 storage. The lookup is done using the issuer DN of the certificate. No certificate chain verification is done. Use a crypto library to make trust decisions.

When the operation is finished, callback will be called. You can then call [func`Gcr`.Pkcs11Certificate.lookup_issuer_finish] to get the result of the operation.

classmethod lookup_issuer_finish(result)[source]
Parameters:

result (Gio.AsyncResult) – the Gio.AsyncResult passed to the callback

Raises:

GLib.Error

Returns:

a new Gcr.Pkcs11Certificate, or None

Return type:

Gcr.Certificate or None

Finishes an asynchronous operation started by [func`Gcr`.Pkcs11Certificate.lookup_issuer_async].

Will return None if no issuer certificate is found. Use error to determine if an error occurred.

classmethod new_from_uri(pkcs11_uri, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

a new Gcr.Certificate, or None

Return type:

Gcr.Certificate or None

Lookup a certificate in the PKCS#11 storage by the given URI.

This call may block, see Gcr.Pkcs11Certificate.new_from_uri_async() for the non-blocking version.

Will return None if no certificate is found. Use error to determine if an error occurred.

classmethod new_from_uri_async(pkcs11_uri, cancellable, callback, *user_data)[source]
Parameters:

Lookup a certificate in the PKCS#11 storage by the given URI.

When the operation is finished, callback will be called. You can then call Gcr.Pkcs11Certificate.new_from_uri_finish() to get the result of the operation.

classmethod new_from_uri_finish(result)[source]
Parameters:

result (Gio.AsyncResult) – the Gio.AsyncResult passed to the callback

Raises:

GLib.Error

Returns:

a new Gcr.Certificate, or None

Return type:

Gcr.Certificate or None

Finishes an asynchronous operation started by Gcr.Pkcs11Certificate.new_from_uri_async().

Will return None if no certificate is found. Use error to determine if an error occurred.

get_attributes()[source]
Returns:

the certificate attributes

Return type:

Gck.Attributes

Access the automatically loaded attributes for this certificate.

Property Details

Gcr.Pkcs11Certificate.props.attributes
Name:

attributes

Type:

Gck.Attributes

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Automatically loaded attributes for this certificate.