## GcrPkcs11Certificate

GcrPkcs11Certificate — A certificate loaded from PKCS#11 storage

## Synopsis

    struct              GcrPkcs11Certificate;
    struct              GcrPkcs11CertificateClass;
    GcrCertificate *    gcr_pkcs11_certificate_lookup_issuer
                                                            (GcrCertificate *certificate,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                gcr_pkcs11_certificate_lookup_issuer_async
                                                            (GcrCertificate *certificate,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    GcrCertificate *    gcr_pkcs11_certificate_lookup_issuer_finish
                                                            (GAsyncResult *result,
                                                             GError **error);
    GckAttributes *     gcr_pkcs11_certificate_get_attributes
                                                            (GcrPkcs11Certificate *self);

## Object Hierarchy

      GObject
       +----GckObject
             +----GcrPkcs11Certificate

## Implemented Interfaces

GcrPkcs11Certificate implements GcrComparableIface and GcrCertificate.

## Properties

      "attributes"               GckAttributes*        : Read / Write / Construct Only

## Description

A GcrPkcs11Certificate is 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()`.

## Details

### struct GcrPkcs11Certificate

    struct GcrPkcs11Certificate;

A certificate loaded from PKCS#11 storage.

### struct GcrPkcs11CertificateClass

    struct GcrPkcs11CertificateClass {
    };

The class for GcrPkcs11Certificate.

### gcr_pkcs11_certificate_lookup_issuer ()

    GcrCertificate *    gcr_pkcs11_certificate_lookup_issuer
                                                            (GcrCertificate *certificate,
                                                             GCancellable *cancellable,
                                                             GError **error);

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 `gcr_pkcs11_certificate_lookup_issuer()` for the non-blocking version.

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

`certificate` : | a GcrCertificate
`cancellable` : | a GCancellable
`error` : | a GError, or NULL
Returns : | a new GcrPkcs11Certificate, or `NULL`. [transfer full]

### gcr_pkcs11_certificate_lookup_issuer_async ()

    void                gcr_pkcs11_certificate_lookup_issuer_async
                                                            (GcrCertificate *certificate,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

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 `gcr_pkcs11_certificate_lookup_issuer_finish()` to get the result of the operation.

`certificate` : | a GcrCertificate
`cancellable` : | a GCancellable
`callback` : | a GAsyncReadyCallback to call when the operation completes
`user_data` : | the data to pass to callback function

### gcr_pkcs11_certificate_lookup_issuer_finish ()

    GcrCertificate *    gcr_pkcs11_certificate_lookup_issuer_finish
                                                            (GAsyncResult *result,
                                                             GError **error);

Finishes an asynchronous operation started by `gcr_pkcs11_certificate_lookup_issuer_async()`.

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

`result` : | the GAsyncResult passed to the callback
`error` : | a GError, or NULL
Returns : | a new GcrPkcs11Certificate, or `NULL`. [transfer full]

### gcr_pkcs11_certificate_get_attributes ()

    GckAttributes *     gcr_pkcs11_certificate_get_attributes
                                                            (GcrPkcs11Certificate *self);

Access the automatically loaded attributes for this certificate.

`self` : | A GcrPkcs11Certificate
Returns : | the certificate attributes. [transfer none]

## Property Details

### The `"attributes"` property

      "attributes"               GckAttributes*        : Read / Write / Construct Only

Automatically loaded attributes for this certificate.