## GTlsFileDatabase

GTlsFileDatabase — TLS file based database type

## Synopsis

    #include <gio/gio.h>

                        GTlsFileDatabase;
    struct              GTlsFileDatabaseInterface;
    GTlsDatabase *      g_tls_file_database_new             (const gchar *anchors,
                                                             GError **error);

## Object Hierarchy

      GInterface
       +----GTlsFileDatabase

## Prerequisites

GTlsFileDatabase requires GTlsDatabase.

## Properties

      "anchors"                  gchar*                : Read / Write / Construct

## Description

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

## Details

### GTlsFileDatabase

    typedef struct _GTlsFileDatabase GTlsFileDatabase;

Implemented by a GTlsDatabase which allows you to load certificates from a file.

Since 2.30

### struct GTlsFileDatabaseInterface

    struct GTlsFileDatabaseInterface {
      GTypeInterface g_iface;
    };

Provides an interface for GTlsFileDatabase implementations.

GTypeInterface `g_iface`; | The parent interface.

### g_tls_file_database_new ()

    GTlsDatabase *      g_tls_file_database_new             (const gchar *anchors,
                                                             GError **error);

Creates a new GTlsFileDatabase which uses anchor certificate authorities in `anchors` to verify certificate chains.

The certificates in `anchors` must be PEM encoded.

`anchors` : | filename of anchor certificate authorities.
`error` : | GError for error reporting, or `NULL` to ignore.
Returns : | the new GTlsFileDatabase, or `NULL` on error. [transfer full][type GTlsFileDatabase]

Since 2.30

## Property Details

### The `"anchors"` property

      "anchors"                  gchar*                : Read / Write / Construct

The path to a file containing PEM encoded certificate authority root anchors. The certificates in this file will be treated as root authorities for the purpose of verifying other certificates via the `g_tls_database_verify_chain()` operation.

Default value: NULL

Since 2.30