### Virtual Method

# Gio TlsDatabase create_certificate_handle

since: 2.30

#### Declaration

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

#### Description

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.

Available since: 2.30

#### Parameters

`certificate`

  Type: `GTlsCertificate`

  Certificate for which to create a handle.

  The data is owned by the caller of the method.

#### Return value

Type: `gchar*`

A newly allocated string containing the handle.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.