Class

GioTlsDatabase

since: 2.30

Description [src]

abstract class Gio.TlsDatabase : GObject.Object
{
  priv: GTlsDatabasePrivate*
}

GTlsDatabase is used to look up certificates and other information from a certificate or key store. It is an abstract base class which TLS library specific subtypes override.

A GTlsDatabase may be accessed from multiple threads by the TLS backend. All implementations are required to be fully thread-safe.

Most common client applications will not directly interact with GTlsDatabase. It is used internally by GTlsConnection.

Available since: 2.30

Ancestors

Instance methods

g_tls_database_create_certificate_handle

Create a handle string for the certificate. The database will only be able to create a handle for certificates that originate from the database. In cases where the database cannot create a handle for a certificate, NULL will be returned.

since: 2.30

g_tls_database_lookup_certificate_for_handle

Look up a certificate by its handle.

since: 2.30

g_tls_database_lookup_certificate_for_handle_async

Asynchronously look up a certificate by its handle in the database. See g_tls_database_lookup_certificate_for_handle() for more information.

since: 2.30

g_tls_database_lookup_certificate_for_handle_finish

Finish an asynchronous lookup of a certificate by its handle. See g_tls_database_lookup_certificate_for_handle() for more information.

since: 2.30

g_tls_database_lookup_certificate_issuer

Look up the issuer of certificate in the database. The GTlsCertificate:issuer property of certificate is not modified, and the two certificates are not hooked into a chain.

since: 2.30

g_tls_database_lookup_certificate_issuer_async

Asynchronously look up the issuer of certificate in the database. See g_tls_database_lookup_certificate_issuer() for more information.

since: 2.30

g_tls_database_lookup_certificate_issuer_finish

Finish an asynchronous lookup issuer operation. See g_tls_database_lookup_certificate_issuer() for more information.

since: 2.30

g_tls_database_lookup_certificates_issued_by

Look up certificates issued by this issuer in the database.

since: 2.30

g_tls_database_lookup_certificates_issued_by_async

Asynchronously look up certificates issued by this issuer in the database. See g_tls_database_lookup_certificates_issued_by() for more information.

since: 2.30

g_tls_database_lookup_certificates_issued_by_finish

Finish an asynchronous lookup of certificates. See g_tls_database_lookup_certificates_issued_by() for more information.

since: 2.30

g_tls_database_verify_chain

Determines the validity of a certificate chain, outside the context of a TLS session.

since: 2.30

g_tls_database_verify_chain_async

Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain. See g_tls_database_verify_chain() for more information.

since: 2.30

g_tls_database_verify_chain_finish

Finish an asynchronous verify chain operation. See g_tls_database_verify_chain() for more information.

since: 2.30

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

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.

Class structure

struct GioTlsDatabaseClass {
  GObjectClass parent_class;
  GTlsCertificateFlags (* verify_chain) (
    GTlsDatabase* self,
    GTlsCertificate* chain,
    const gchar* purpose,
    GSocketConnectable* identity,
    GTlsInteraction* interaction,
    GTlsDatabaseVerifyFlags flags,
    GCancellable* cancellable,
    GError** error
  );
  void (* verify_chain_async) (
    GTlsDatabase* self,
    GTlsCertificate* chain,
    const gchar* purpose,
    GSocketConnectable* identity,
    GTlsInteraction* interaction,
    GTlsDatabaseVerifyFlags flags,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  GTlsCertificateFlags (* verify_chain_finish) (
    GTlsDatabase* self,
    GAsyncResult* result,
    GError** error
  );
  gchar* (* create_certificate_handle) (
    GTlsDatabase* self,
    GTlsCertificate* certificate
  );
  GTlsCertificate* (* lookup_certificate_for_handle) (
    GTlsDatabase* self,
    const gchar* handle,
    GTlsInteraction* interaction,
    GTlsDatabaseLookupFlags flags,
    GCancellable* cancellable,
    GError** error
  );
  void (* lookup_certificate_for_handle_async) (
    GTlsDatabase* self,
    const gchar* handle,
    GTlsInteraction* interaction,
    GTlsDatabaseLookupFlags flags,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  GTlsCertificate* (* lookup_certificate_for_handle_finish) (
    GTlsDatabase* self,
    GAsyncResult* result,
    GError** error
  );
  GTlsCertificate* (* lookup_certificate_issuer) (
    GTlsDatabase* self,
    GTlsCertificate* certificate,
    GTlsInteraction* interaction,
    GTlsDatabaseLookupFlags flags,
    GCancellable* cancellable,
    GError** error
  );
  void (* lookup_certificate_issuer_async) (
    GTlsDatabase* self,
    GTlsCertificate* certificate,
    GTlsInteraction* interaction,
    GTlsDatabaseLookupFlags flags,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  GTlsCertificate* (* lookup_certificate_issuer_finish) (
    GTlsDatabase* self,
    GAsyncResult* result,
    GError** error
  );
  GList* (* lookup_certificates_issued_by) (
    GTlsDatabase* self,
    GByteArray* issuer_raw_dn,
    GTlsInteraction* interaction,
    GTlsDatabaseLookupFlags flags,
    GCancellable* cancellable,
    GError** error
  );
  void (* lookup_certificates_issued_by_async) (
    GTlsDatabase* self,
    GByteArray* issuer_raw_dn,
    GTlsInteraction* interaction,
    GTlsDatabaseLookupFlags flags,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  GList* (* lookup_certificates_issued_by_finish) (
    GTlsDatabase* self,
    GAsyncResult* result,
    GError** error
  );
  
}

The class for GTlsDatabase. Derived classes should implement the various virtual methods. _async and _finish methods have a default implementation that runs the corresponding sync method in a thread.

Class members
parent_class: GObjectClass

No description available.

verify_chain: GTlsCertificateFlags (* verify_chain) ( GTlsDatabase* self, GTlsCertificate* chain, const gchar* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GError** error )

Virtual method implementing g_tls_database_verify_chain().

verify_chain_async: void (* verify_chain_async) ( GTlsDatabase* self, GTlsCertificate* chain, const gchar* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )

Virtual method implementing g_tls_database_verify_chain_async().

verify_chain_finish: GTlsCertificateFlags (* verify_chain_finish) ( GTlsDatabase* self, GAsyncResult* result, GError** error )

Virtual method implementing g_tls_database_verify_chain_finish().

create_certificate_handle: gchar* (* create_certificate_handle) ( GTlsDatabase* self, GTlsCertificate* certificate )

Virtual method implementing g_tls_database_create_certificate_handle().

lookup_certificate_for_handle: GTlsCertificate* (* lookup_certificate_for_handle) ( GTlsDatabase* self, const gchar* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** error )

Virtual method implementing g_tls_database_lookup_certificate_for_handle().

lookup_certificate_for_handle_async: void (* lookup_certificate_for_handle_async) ( GTlsDatabase* self, const gchar* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )

Virtual method implementing g_tls_database_lookup_certificate_for_handle_async().

lookup_certificate_for_handle_finish: GTlsCertificate* (* lookup_certificate_for_handle_finish) ( GTlsDatabase* self, GAsyncResult* result, GError** error )

Virtual method implementing g_tls_database_lookup_certificate_for_handle_finish().

lookup_certificate_issuer: GTlsCertificate* (* lookup_certificate_issuer) ( GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** error )

Virtual method implementing g_tls_database_lookup_certificate_issuer().

lookup_certificate_issuer_async: void (* lookup_certificate_issuer_async) ( GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )

Virtual method implementing g_tls_database_lookup_certificate_issuer_async().

lookup_certificate_issuer_finish: GTlsCertificate* (* lookup_certificate_issuer_finish) ( GTlsDatabase* self, GAsyncResult* result, GError** error )

Virtual method implementing g_tls_database_lookup_certificate_issuer_finish().

lookup_certificates_issued_by: GList* (* lookup_certificates_issued_by) ( GTlsDatabase* self, GByteArray* issuer_raw_dn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** error )

Virtual method implementing g_tls_database_lookup_certificates_issued_by().

lookup_certificates_issued_by_async: void (* lookup_certificates_issued_by_async) ( GTlsDatabase* self, GByteArray* issuer_raw_dn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )

Virtual method implementing g_tls_database_lookup_certificates_issued_by_async().

lookup_certificates_issued_by_finish: GList* (* lookup_certificates_issued_by_finish) ( GTlsDatabase* self, GAsyncResult* result, GError** error )

Virtual method implementing g_tls_database_lookup_certificates_issued_by_finish().

Virtual methods

Gio.TlsDatabaseClass.create_certificate_handle

Create a handle string for the certificate. The database will only be able to create a handle for certificates that originate from the database. In cases where the database cannot create a handle for a certificate, NULL will be returned.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificate_for_handle

Look up a certificate by its handle.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificate_for_handle_async

Asynchronously look up a certificate by its handle in the database. See g_tls_database_lookup_certificate_for_handle() for more information.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificate_for_handle_finish

Finish an asynchronous lookup of a certificate by its handle. See g_tls_database_lookup_certificate_for_handle() for more information.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificate_issuer

Look up the issuer of certificate in the database. The GTlsCertificate:issuer property of certificate is not modified, and the two certificates are not hooked into a chain.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificate_issuer_async

Asynchronously look up the issuer of certificate in the database. See g_tls_database_lookup_certificate_issuer() for more information.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificate_issuer_finish

Finish an asynchronous lookup issuer operation. See g_tls_database_lookup_certificate_issuer() for more information.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificates_issued_by

Look up certificates issued by this issuer in the database.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificates_issued_by_async

Asynchronously look up certificates issued by this issuer in the database. See g_tls_database_lookup_certificates_issued_by() for more information.

since: 2.30

Gio.TlsDatabaseClass.lookup_certificates_issued_by_finish

Finish an asynchronous lookup of certificates. See g_tls_database_lookup_certificates_issued_by() for more information.

since: 2.30

Gio.TlsDatabaseClass.verify_chain

Determines the validity of a certificate chain, outside the context of a TLS session.

since: 2.30

Gio.TlsDatabaseClass.verify_chain_async

Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain. See g_tls_database_verify_chain() for more information.

since: 2.30

Gio.TlsDatabaseClass.verify_chain_finish

Finish an asynchronous verify chain operation. See g_tls_database_verify_chain() for more information.

since: 2.30