Gio.TlsDatabase::verify_chain

function vfunc_verify_chain(chain: Gio.TlsCertificate, purpose: String, identity: Gio.SocketConnectable, interaction: Gio.TlsInteraction, flags: Gio.TlsDatabaseVerifyFlags, cancellable: Gio.Cancellable): Gio.TlsCertificateFlags {
}
  

Verify's a certificate chain after looking up and adding any missing certificates to the chain.

chain is a chain of Gio.TlsCertificate 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 Gio.TlsDatabaseVerifyFlags.none should be used.

This function can block, use Gio.TlsDatabase.prototype.verify_chain_async to perform the verification operation asynchronously.

Since 2.30

chain

a Gio.TlsCertificate chain

purpose

the purpose that this certificate chain will be used for.

identity

the expected peer identity

interaction

used to interact with the user if necessary

flags

additional verify flags

cancellable

a Gio.Cancellable, or null

Returns

the appropriate Gio.TlsCertificateFlags which represents the result of verification.