TlsDatabase.lookupCertificateForHandle

gio.tls_certificate.TlsCertificate lookupCertificateForHandle(string handle, gio.tls_interaction.TlsInteraction interaction, gio.types.TlsDatabaseLookupFlags flags, gio.cancellable.Cancellable cancellable = null)

Look up a certificate by its handle.

The handle should have been created by calling [gio.tls_database.TlsDatabase.createCertificateHandle] 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 [gio.tls_database.TlsDatabase.lookupCertificateForHandleAsync] to perform the lookup operation asynchronously.

Parameters

handlea certificate handle
interactionused to interact with the user if necessary
flagsFlags which affect the lookup.
cancellablea #GCancellable, or null

Returns

a newly allocated

#GTlsCertificate, or null. Use [gobject.object.ObjectWrap.unref] to release the certificate.

Throws

[ErrorWrap]