## GTlsFileDatabase

GTlsFileDatabase — TLS file based database type

## Functions

GTlsDatabase * | g_tls_file_database_new ()

## Properties

gchar * | anchors | Read / Write / Construct

## Types and Values

| GTlsFileDatabase
struct | GTlsFileDatabaseInterface

## Object Hierarchy

        GInterface
        ╰── GTlsFileDatabase

## Prerequisites

GTlsFileDatabase requires GTlsDatabase.

## Includes

    #include <gio/gio.h>

## 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.

## Functions

### 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.

#### Parameters

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

## Types and Values

### 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.

#### Members

## Property Details

### The `“anchors”` property

      “anchors”                  gchar *

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.

Flags: Read / Write / Construct

Default value: NULL

Since: 2.30