## CamelCertDB CamelCertDB |

## Synopsis

    enum                CamelCertTrust;
                        CamelCert;
    CamelCert *         camel_cert_new                      (void);
    void                camel_cert_ref                      (CamelCert *cert);
    void                camel_cert_unref                    (CamelCert *cert);
    struct              CamelCertDB;
    CamelCertDB *       camel_certdb_new                    (void);
    void                camel_certdb_set_default            (CamelCertDB *certdb);
    CamelCertDB *       camel_certdb_get_default            (void);
    void                camel_certdb_set_filename           (CamelCertDB *certdb,
                                                             const gchar *filename);
    gint                camel_certdb_load                   (CamelCertDB *certdb);
    gint                camel_certdb_save                   (CamelCertDB *certdb);
    void                camel_certdb_touch                  (CamelCertDB *certdb);
    CamelCert *         camel_certdb_get_host               (CamelCertDB *certdb,
                                                             const gchar *hostname,
                                                             const gchar *fingerprint);
    void                camel_certdb_put                    (CamelCertDB *certdb,
                                                             CamelCert *cert);
    void                camel_certdb_remove_host            (CamelCertDB *certdb,
                                                             const gchar *hostname,
                                                             const gchar *fingerprint);
    void                camel_certdb_clear                  (CamelCertDB *certdb);

## Object Hierarchy

      GObject
       +----CamelCertDB

## Description

## Details

### enum CamelCertTrust

    typedef enum {
    	CAMEL_CERT_TRUST_UNKNOWN,
    	CAMEL_CERT_TRUST_NEVER,
    	CAMEL_CERT_TRUST_MARGINAL,
    	CAMEL_CERT_TRUST_FULLY,
    	CAMEL_CERT_TRUST_ULTIMATE,
    	CAMEL_CERT_TRUST_TEMPORARY
    } CamelCertTrust;

`CAMEL_CERT_TRUST_UNKNOWN` |
`CAMEL_CERT_TRUST_NEVER` |
`CAMEL_CERT_TRUST_MARGINAL` |
`CAMEL_CERT_TRUST_FULLY` |
`CAMEL_CERT_TRUST_ULTIMATE` |
`CAMEL_CERT_TRUST_TEMPORARY` |

### CamelCert

    typedef struct {
    	volatile gint refcount;

    	gchar *issuer;
    	gchar *subject;
    	gchar *hostname;
    	gchar *fingerprint;

    	CamelCertTrust trust;
    	GBytes *rawcert;
    } CamelCert;

### camel_cert_new ()

    CamelCert *         camel_cert_new                      (void);

### camel_cert_ref ()

    void                camel_cert_ref                      (CamelCert *cert);

### camel_cert_unref ()

    void                camel_cert_unref                    (CamelCert *cert);

### struct CamelCertDB

    struct CamelCertDB;

### camel_certdb_new ()

    CamelCertDB *       camel_certdb_new                    (void);

### camel_certdb_set_default ()

    void                camel_certdb_set_default            (CamelCertDB *certdb);

### camel_certdb_get_default ()

    CamelCertDB *       camel_certdb_get_default            (void);

### camel_certdb_set_filename ()

    void                camel_certdb_set_filename           (CamelCertDB *certdb,
                                                             const gchar *filename);

### camel_certdb_load ()

    gint                camel_certdb_load                   (CamelCertDB *certdb);

### camel_certdb_save ()

    gint                camel_certdb_save                   (CamelCertDB *certdb);

### camel_certdb_touch ()

    void                camel_certdb_touch                  (CamelCertDB *certdb);

### camel_certdb_get_host ()

    CamelCert *         camel_certdb_get_host               (CamelCertDB *certdb,
                                                             const gchar *hostname,
                                                             const gchar *fingerprint);

FIXME Document me!

Since 3.6

### camel_certdb_put ()

    void                camel_certdb_put                    (CamelCertDB *certdb,
                                                             CamelCert *cert);

FIXME Document me!

Since 3.6

### camel_certdb_remove_host ()

    void                camel_certdb_remove_host            (CamelCertDB *certdb,
                                                             const gchar *hostname,
                                                             const gchar *fingerprint);

FIXME Document me!

Since 3.6

### camel_certdb_clear ()

    void                camel_certdb_clear                  (CamelCertDB *certdb);