### Class

# Gcr Pkcs11Certificate

since: 3

#### Description [src]

    class Gcr.Pkcs11Certificate : Gck.Object
      implements Gcr.Certificate, Gcr.Comparable {
      /* No available fields */
    }

A certificate loaded from a PKCS#11 storage. It is also a valid `GckObject` and can be used as such.

Use `gcr_pkcs11_certificate_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 gcr_pkcs11_certificate_get_attributes().

Available since: 3

#### Ancestors

- GckObject
- GObject

#### Implements

- GcrCertificate
- GcrComparable

#### Functions

###### gcr_pkcs11_certificate_lookup_issuer

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.

since: 3

###### gcr_pkcs11_certificate_lookup_issuer_async

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.

since: 3

###### gcr_pkcs11_certificate_lookup_issuer_finish

Finishes an asynchronous operation started by gcr_pkcs11_certificate_lookup_issuer_async().

since: 3

#### Instance methods

###### gcr_pkcs11_certificate_get_attributes

Access the automatically loaded attributes for this certificate.

since: 3

##### Methods inherited from GckObject (28)

Please see GckObject for a full list of methods.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GcrCertificate (23)

###### gcr_certificate_get_basic_constraints

Get the basic constraints for the certificate if present. If `FALSE` is returned then no basic constraints are present and the `is_ca` and `path_len` arguments are not changed.

since: 3

###### gcr_certificate_get_der_data

Gets the raw DER data for an X.509 certificate.

since: 3

###### gcr_certificate_get_expiry_date

Get the expiry date of this certificate.

since: 3

###### gcr_certificate_get_fingerprint

Calculate the fingerprint for this certificate.

since: 3

###### gcr_certificate_get_fingerprint_hex

Calculate the fingerprint for this certificate, and return it as a hex string.

since: 3

###### gcr_certificate_get_icon

Get the icon for a certificate.

since: 3

###### gcr_certificate_get_issued_date

Get the issued date of this certificate.

since: 3

###### gcr_certificate_get_issuer_cn

Get the common name of the issuer of this certificate.

since: 3

###### gcr_certificate_get_issuer_dn

Get the full issuer DN of the certificate as a (mostly) readable string.

since: 3

###### gcr_certificate_get_issuer_name

Get a name to represent the issuer of this certificate.

since: 3

###### gcr_certificate_get_issuer_part

Get a part of the DN of the issuer of this certificate.

since: 3

###### gcr_certificate_get_issuer_raw

Get the raw DER data for the issuer DN of the certificate.

since: 3

###### gcr_certificate_get_key_size

Get the key size in bits of the public key represented by this certificate.

since: 3

###### gcr_certificate_get_markup_text

Calculate a GMarkup string for displaying this certificate.

since: 3

###### gcr_certificate_get_serial_number

Get the raw binary serial number of the certificate.

since: 3

###### gcr_certificate_get_serial_number_hex

Get the serial number of the certificate as a hex string.

since: 3

###### gcr_certificate_get_subject_cn

Get the common name of the subject of this certificate.

since: 3

###### gcr_certificate_get_subject_dn

Get the full subject DN of the certificate as a (mostly) readable string.

since: 3

###### gcr_certificate_get_subject_name

Get a name to represent the subject of this certificate.

since: 3

###### gcr_certificate_get_subject_part

Get a part of the DN of the subject of this certificate.

since: 3

###### gcr_certificate_get_subject_raw

Get the raw DER data for the subject DN of the certificate.

since: 3

###### gcr_certificate_is_issuer

Check if `issuer` could be the issuer of this certificate. This is done by comparing the relevant subject and issuer fields. No signature check is done. Proper verification of certificates must be done via a crypto library.

since: 3

###### gcr_certificate_mixin_emit_notify

Implementers of the `GcrCertificate` mixin should call this function to notify when the certificate has changed to emit notifications on the various properties.

since: 3

##### Methods inherited from GcrComparable (1)

###### gcr_comparable_compare

Compare whether two objects represent the same thing. The return value can also be used to sort the objects.

since: 3

#### Properties

###### Gcr.Pkcs11Certificate:attributes

Automatically loaded attributes for this certificate.

since: 3

##### Properties inherited from GckObject (3)

###### Gck.Object:handle

The raw PKCS11 handle for this object.

since: 1

###### Gck.Object:module

The GckModule that this object belongs to.

since: 1

###### Gck.Object:session

The PKCS11 session to make calls on when this object needs to perform operations on itself.

since: 1

##### Properties inherited from GcrCertificate (7)

###### GcrCertificate:description

A readable description for this certificate.

since: 3

###### GcrCertificate:expiry

The expiry date of the certificate.

since: 3

###### GcrCertificate:icon

An icon representing the certificate.

since: 3

###### GcrCertificate:issuer

Common name part of the certificate issuer.

since: 3

###### GcrCertificate:label

A readable label for this certificate.

since: 3

###### GcrCertificate:markup

GLib markup to describe the certificate.

since: 3

###### GcrCertificate:subject

Common name part of the certificate subject.

since: 3

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0

#### Class structure

    struct GcrPkcs11CertificateClass {
      /* no available fields */
    }

No description available.