TlsFileDatabase

GTlsFileDatabase is implemented by GTlsDatabase objects which load their certificate information from a file. It is an interface which TLS library specific subtypes implement.

Constructors

this
this(GTlsFileDatabase* gTlsFileDatabase)

Sets our main struct and passes it to the parent class

this
this(string anchors)

Creates a new GTlsFileDatabase which uses anchor certificate authorities in anchors to verify certificate chains. The certificates in anchors must be PEM encoded. Since 2.30

Members

Functions

getStruct
void* getStruct()

the main Gtk struct as a void*

getTlsFileDatabaseStruct
GTlsFileDatabase* getTlsFileDatabaseStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

gTlsFileDatabase
GTlsFileDatabase* gTlsFileDatabase;

the main Gtk struct

Inherited Members

From TlsDatabase

gTlsDatabase
GTlsDatabase* gTlsDatabase;

the main Gtk struct

getTlsDatabaseStruct
GTlsDatabase* getTlsDatabaseStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
verifyChain
GTlsCertificateFlags verifyChain(TlsCertificate chain, string purpose, SocketConnectableIF identity, TlsInteraction interaction, GTlsDatabaseVerifyFlags flags, Cancellable cancellable)

Verify's a certificate chain after looking up and adding any missing certificates to the chain. chain is a chain of GTlsCertificate objects each pointing to the next certificate in the chain by its issuer property. The chain may initially consist of one or more certificates. After the verification process is complete, chain may be modified by adding missing certificates, or removing extra certificates. If a certificate anchor was found, then it is added to the chain. purpose describes the purpose (or usage) for which the certificate is being used. Typically purpose will be set to G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER which means that the certificate is being used to authenticate a server (and we are acting as the client). The identity is used to check for pinned certificates (trust exceptions) in the database. These will override the normal verification process on a host by host basis. Currently there are no flags, and G_TLS_DATABASE_VERIFY_NONE should be used. This function can block, use g_tls_database_verify_chain_async() to perform the verification operation asynchronously. Since 2.30

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

Asynchronously verify's 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

verifyChainFinish
GTlsCertificateFlags verifyChainFinish(AsyncResultIF result)

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

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

Lookup the issuer of certificate in the database. The issuer property of certificate is not modified, and the two certificates are not hooked into a chain. This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform the lookup operation asynchronously. Since 2.30

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. Since 2.30

lookupCertificateIssuerFinish
TlsCertificate lookupCertificateIssuerFinish(AsyncResultIF result)

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

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

Lookup certificates issued by this issuer in the database. This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform the lookup operation asynchronously. Since 2.30

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. The database may choose to hold a reference to the issuer byte array for the duration of of this asynchronous operation. The byte array should not be modified during this time. Since 2.30

lookupCertificatesIssuedByFinish
ListG lookupCertificatesIssuedByFinish(AsyncResultIF result)

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

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. This handle should be stable across various instances of the application, and between applications. If a certificate is modified in the database, then it is not guaranteed that this handle will continue to point to it. Since 2.30

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

Lookup a certificate by its handle. The handle should have been created by calling g_tls_database_create_certificate_handle() on a GTlsDatabase object of the same TLS backend. The handle is designed to remain valid across instantiations of the database. If the handle is no longer valid, or does not point to a certificate in this database, then NULL will be returned. This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform the lookup operation asynchronously. Since 2.30

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. Since 2.30

lookupCertificateForHandleFinish
TlsCertificate lookupCertificateForHandleFinish(AsyncResultIF result)

Finish an asynchronous lookup of a certificate by its handle. See g_tls_database_lookup_certificate_handle() for more information. If the handle is no longer valid, or does not point to a certificate in this database, then NULL will be returned. Since 2.30

Meta