TlsDatabase

GTlsDatabase is used to lookup 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

class TlsDatabase : ObjectG {}

Constructors

this
this(GTlsDatabase* gTlsDatabase, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

Members

Functions

createCertificateHandle
string createCertificateHandle(TlsCertificate certificate)

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.

getStruct
void* getStruct()

the main Gtk struct as a void*

getTlsDatabaseStruct
GTlsDatabase* getTlsDatabaseStruct(bool transferOwnership = false)

Get the main Gtk struct

lookupCertificateForHandle
TlsCertificate lookupCertificateForHandle(string handle, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable)

Lookup a certificate by its handle.

lookupCertificateForHandleAsync
void lookupCertificateForHandleAsync(string handle, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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

lookupCertificateForHandleFinish
TlsCertificate lookupCertificateForHandleFinish(AsyncResultIF result)

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

lookupCertificateIssuer
TlsCertificate lookupCertificateIssuer(TlsCertificate certificate, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable)

Lookup the issuer of certificate in the database.

lookupCertificateIssuerAsync
void lookupCertificateIssuerAsync(TlsCertificate certificate, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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

lookupCertificateIssuerFinish
TlsCertificate lookupCertificateIssuerFinish(AsyncResultIF result)

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

lookupCertificatesIssuedBy
ListG lookupCertificatesIssuedBy(ByteArray issuerRawDn, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable)

Lookup certificates issued by this issuer in the database.

lookupCertificatesIssuedByAsync
void lookupCertificatesIssuedByAsync(ByteArray issuerRawDn, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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

lookupCertificatesIssuedByFinish
ListG lookupCertificatesIssuedByFinish(AsyncResultIF result)

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

verifyChain
GTlsCertificateFlags verifyChain(TlsCertificate chain, string purpose, SocketConnectableIF identity, TlsInteraction interaction, GTlsDatabaseVerifyFlags flags, Cancellable cancellable)

Determines the validity of a certificate chain after looking up and adding any missing certificates to the chain.

verifyChainAsync
void verifyChainAsync(TlsCertificate chain, string purpose, SocketConnectableIF identity, TlsInteraction interaction, GTlsDatabaseVerifyFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

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.

verifyChainFinish
GTlsCertificateFlags verifyChainFinish(AsyncResultIF result)

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

Static functions

getType
GType getType()

Variables

gTlsDatabase
GTlsDatabase* gTlsDatabase;

the main Gtk struct

Meta

Since

2.30