## openpgp

openpgp

## Functions

int | gnutls_openpgp_crt_init ()
void | gnutls_openpgp_crt_deinit ()
int | gnutls_openpgp_crt_import ()
int | gnutls_openpgp_crt_export ()
int | gnutls_openpgp_crt_export2 ()
int | gnutls_openpgp_crt_print ()
int | gnutls_openpgp_crt_get_key_usage ()
int | gnutls_openpgp_crt_get_fingerprint ()
int | gnutls_openpgp_crt_get_subkey_fingerprint ()
int | gnutls_openpgp_crt_get_name ()
gnutls_pk_algorithm_t | gnutls_openpgp_crt_get_pk_algorithm ()
int | gnutls_openpgp_crt_get_version ()
time_t | gnutls_openpgp_crt_get_creation_time ()
time_t | gnutls_openpgp_crt_get_expiration_time ()
int | gnutls_openpgp_crt_get_key_id ()
int | gnutls_openpgp_crt_check_hostname ()
int | gnutls_openpgp_crt_check_hostname2 ()
int | gnutls_openpgp_crt_check_email ()
int | gnutls_openpgp_crt_get_revoked_status ()
int | gnutls_openpgp_crt_get_subkey_count ()
int | gnutls_openpgp_crt_get_subkey_idx ()
int | gnutls_openpgp_crt_get_subkey_revoked_status ()
gnutls_pk_algorithm_t | gnutls_openpgp_crt_get_subkey_pk_algorithm ()
time_t | gnutls_openpgp_crt_get_subkey_creation_time ()
time_t | gnutls_openpgp_crt_get_subkey_expiration_time ()
int | gnutls_openpgp_crt_get_subkey_id ()
int | gnutls_openpgp_crt_get_subkey_usage ()
int | gnutls_openpgp_crt_get_subkey_pk_dsa_raw ()
int | gnutls_openpgp_crt_get_subkey_pk_rsa_raw ()
int | gnutls_openpgp_crt_get_pk_dsa_raw ()
int | gnutls_openpgp_crt_get_pk_rsa_raw ()
int | gnutls_openpgp_crt_get_preferred_key_id ()
int | gnutls_openpgp_crt_set_preferred_key_id ()
int | gnutls_openpgp_privkey_init ()
void | gnutls_openpgp_privkey_deinit ()
gnutls_pk_algorithm_t | gnutls_openpgp_privkey_get_pk_algorithm ()
gnutls_sec_param_t | gnutls_openpgp_privkey_sec_param ()
int | gnutls_openpgp_privkey_import ()
int | gnutls_openpgp_privkey_get_fingerprint ()
int | gnutls_openpgp_privkey_get_subkey_fingerprint ()
int | gnutls_openpgp_privkey_get_key_id ()
int | gnutls_openpgp_privkey_get_subkey_count ()
int | gnutls_openpgp_privkey_get_subkey_idx ()
int | gnutls_openpgp_privkey_get_subkey_revoked_status ()
int | gnutls_openpgp_privkey_get_revoked_status ()
gnutls_pk_algorithm_t | gnutls_openpgp_privkey_get_subkey_pk_algorithm ()
time_t | gnutls_openpgp_privkey_get_subkey_expiration_time ()
int | gnutls_openpgp_privkey_get_subkey_id ()
time_t | gnutls_openpgp_privkey_get_subkey_creation_time ()
int | gnutls_openpgp_privkey_export_subkey_dsa_raw ()
int | gnutls_openpgp_privkey_export_subkey_rsa_raw ()
int | gnutls_openpgp_privkey_export_dsa_raw ()
int | gnutls_openpgp_privkey_export_rsa_raw ()
int | gnutls_openpgp_privkey_export ()
int | gnutls_openpgp_privkey_export2 ()
int | gnutls_openpgp_privkey_set_preferred_key_id ()
int | gnutls_openpgp_privkey_get_preferred_key_id ()
int | gnutls_openpgp_crt_get_auth_subkey ()
int | gnutls_openpgp_keyring_init ()
void | gnutls_openpgp_keyring_deinit ()
int | gnutls_openpgp_keyring_import ()
int | gnutls_openpgp_keyring_check_id ()
int | gnutls_openpgp_crt_verify_ring ()
int | gnutls_openpgp_crt_verify_self ()
int | gnutls_openpgp_keyring_get_crt ()
int | gnutls_openpgp_keyring_get_crt_count ()
int | (*gnutls_openpgp_recv_key_func) ()
void | gnutls_openpgp_set_recv_key_function ()
int | gnutls_certificate_set_openpgp_key ()
int | gnutls_certificate_get_openpgp_key ()
int | gnutls_certificate_get_openpgp_crt ()
int | gnutls_certificate_set_openpgp_key_file ()
int | gnutls_certificate_set_openpgp_key_mem ()
int | gnutls_certificate_set_openpgp_key_file2 ()
int | gnutls_certificate_set_openpgp_key_mem2 ()
int | gnutls_certificate_set_openpgp_keyring_mem ()
int | gnutls_certificate_set_openpgp_keyring_file ()

## Types and Values

enum | gnutls_openpgp_crt_fmt_t
#define | GNUTLS_OPENPGP_KEYID_SIZE
#define | GNUTLS_OPENPGP_V4_FINGERPRINT_SIZE
#define | GNUTLS_OPENPGP_MASTER_KEYID_IDX

## Description

## Functions

### gnutls_openpgp_crt_init ()

    int
    gnutls_openpgp_crt_init (gnutls_openpgp_crt_t *key);

`gnutls_openpgp_crt_init` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_deinit ()

    void
    gnutls_openpgp_crt_deinit (gnutls_openpgp_crt_t key);

`gnutls_openpgp_crt_deinit` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_import ()

    int
    gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key,
                               const gnutls_datum_t *data,
                               gnutls_openpgp_crt_fmt_t format);

`gnutls_openpgp_crt_import` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_export ()

    int
    gnutls_openpgp_crt_export (gnutls_openpgp_crt_t key,
                               gnutls_openpgp_crt_fmt_t format,
                               void *output_data,
                               size_t *output_data_size);

`gnutls_openpgp_crt_export` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_export2 ()

    int
    gnutls_openpgp_crt_export2 (gnutls_openpgp_crt_t key,
                                gnutls_openpgp_crt_fmt_t format,
                                gnutls_datum_t *out);

`gnutls_openpgp_crt_export2` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_print ()

    int
    gnutls_openpgp_crt_print (gnutls_openpgp_crt_t cert,
                              gnutls_certificate_print_formats_t format,
                              gnutls_datum_t *out);

`gnutls_openpgp_crt_print` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_key_usage ()

    int
    gnutls_openpgp_crt_get_key_usage (gnutls_openpgp_crt_t key,
                                      unsigned int *key_usage);

`gnutls_openpgp_crt_get_key_usage` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_fingerprint ()

    int
    gnutls_openpgp_crt_get_fingerprint (gnutls_openpgp_crt_t key,
                                        void *fpr,
                                        size_t *fprlen);

`gnutls_openpgp_crt_get_fingerprint` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_fingerprint ()

    int
    gnutls_openpgp_crt_get_subkey_fingerprint
                                   (gnutls_openpgp_crt_t key,
                                    unsigned int idx,
                                    void *fpr,
                                    size_t *fprlen);

`gnutls_openpgp_crt_get_subkey_fingerprint` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_name ()

    int
    gnutls_openpgp_crt_get_name (gnutls_openpgp_crt_t key,
                                 int idx,
                                 char *buf,
                                 size_t *sizeof_buf);

`gnutls_openpgp_crt_get_name` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_pk_algorithm ()

    gnutls_pk_algorithm_t
    gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key,
                                         unsigned int *bits);

`gnutls_openpgp_crt_get_pk_algorithm` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_version ()

    int
    gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key);

`gnutls_openpgp_crt_get_version` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_creation_time ()

    time_t
    gnutls_openpgp_crt_get_creation_time (gnutls_openpgp_crt_t key);

`gnutls_openpgp_crt_get_creation_time` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_expiration_time ()

    time_t
    gnutls_openpgp_crt_get_expiration_time
                                   (gnutls_openpgp_crt_t key);

`gnutls_openpgp_crt_get_expiration_time` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_key_id ()

    int
    gnutls_openpgp_crt_get_key_id (gnutls_openpgp_crt_t key,
                                   gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_crt_get_key_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_check_hostname ()

    int
    gnutls_openpgp_crt_check_hostname (gnutls_openpgp_crt_t key,
                                       const char *hostname);

`gnutls_openpgp_crt_check_hostname` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_check_hostname2 ()

    int
    gnutls_openpgp_crt_check_hostname2 (gnutls_openpgp_crt_t key,
                                        const char *hostname,
                                        unsigned int flags);

`gnutls_openpgp_crt_check_hostname2` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_check_email ()

    int
    gnutls_openpgp_crt_check_email (gnutls_openpgp_crt_t key,
                                    const char *email,
                                    unsigned  flags);

`gnutls_openpgp_crt_check_email` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_revoked_status ()

    int
    gnutls_openpgp_crt_get_revoked_status (gnutls_openpgp_crt_t key);

`gnutls_openpgp_crt_get_revoked_status` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_count ()

    int
    gnutls_openpgp_crt_get_subkey_count (gnutls_openpgp_crt_t key);

`gnutls_openpgp_crt_get_subkey_count` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_idx ()

    int
    gnutls_openpgp_crt_get_subkey_idx (gnutls_openpgp_crt_t key,
                                       const gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_crt_get_subkey_idx` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_revoked_status ()

    int
    gnutls_openpgp_crt_get_subkey_revoked_status
                                   (gnutls_openpgp_crt_t key,
                                    unsigned int idx);

`gnutls_openpgp_crt_get_subkey_revoked_status` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_pk_algorithm ()

    gnutls_pk_algorithm_t
    gnutls_openpgp_crt_get_subkey_pk_algorithm
                                   (gnutls_openpgp_crt_t key,
                                    unsigned int idx,
                                    unsigned int *bits);

`gnutls_openpgp_crt_get_subkey_pk_algorithm` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_creation_time ()

    time_t
    gnutls_openpgp_crt_get_subkey_creation_time
                                   (gnutls_openpgp_crt_t key,
                                    unsigned int idx);

`gnutls_openpgp_crt_get_subkey_creation_time` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_expiration_time ()

    time_t
    gnutls_openpgp_crt_get_subkey_expiration_time
                                   (gnutls_openpgp_crt_t key,
                                    unsigned int idx);

`gnutls_openpgp_crt_get_subkey_expiration_time` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_id ()

    int
    gnutls_openpgp_crt_get_subkey_id (gnutls_openpgp_crt_t key,
                                      unsigned int idx,
                                      gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_crt_get_subkey_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_usage ()

    int
    gnutls_openpgp_crt_get_subkey_usage (gnutls_openpgp_crt_t key,
                                         unsigned int idx,
                                         unsigned int *key_usage);

`gnutls_openpgp_crt_get_subkey_usage` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_pk_dsa_raw ()

    int
    gnutls_openpgp_crt_get_subkey_pk_dsa_raw
                                   (gnutls_openpgp_crt_t crt,
                                    unsigned int idx,
                                    gnutls_datum_t *p,
                                    gnutls_datum_t *q,
                                    gnutls_datum_t *g,
                                    gnutls_datum_t *y);

`gnutls_openpgp_crt_get_subkey_pk_dsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_subkey_pk_rsa_raw ()

    int
    gnutls_openpgp_crt_get_subkey_pk_rsa_raw
                                   (gnutls_openpgp_crt_t crt,
                                    unsigned int idx,
                                    gnutls_datum_t *m,
                                    gnutls_datum_t *e);

`gnutls_openpgp_crt_get_subkey_pk_rsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_pk_dsa_raw ()

    int
    gnutls_openpgp_crt_get_pk_dsa_raw (gnutls_openpgp_crt_t crt,
                                       gnutls_datum_t *p,
                                       gnutls_datum_t *q,
                                       gnutls_datum_t *g,
                                       gnutls_datum_t *y);

`gnutls_openpgp_crt_get_pk_dsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_pk_rsa_raw ()

    int
    gnutls_openpgp_crt_get_pk_rsa_raw (gnutls_openpgp_crt_t crt,
                                       gnutls_datum_t *m,
                                       gnutls_datum_t *e);

`gnutls_openpgp_crt_get_pk_rsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_preferred_key_id ()

    int
    gnutls_openpgp_crt_get_preferred_key_id
                                   (gnutls_openpgp_crt_t key,
                                    gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_crt_get_preferred_key_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_set_preferred_key_id ()

    int
    gnutls_openpgp_crt_set_preferred_key_id
                                   (gnutls_openpgp_crt_t key,
                                    const gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_crt_set_preferred_key_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_init ()

    int
    gnutls_openpgp_privkey_init (gnutls_openpgp_privkey_t *key);

`gnutls_openpgp_privkey_init` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_deinit ()

    void
    gnutls_openpgp_privkey_deinit (gnutls_openpgp_privkey_t key);

`gnutls_openpgp_privkey_deinit` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_pk_algorithm ()

    gnutls_pk_algorithm_t
    gnutls_openpgp_privkey_get_pk_algorithm
                                   (gnutls_openpgp_privkey_t key,
                                    unsigned int *bits);

`gnutls_openpgp_privkey_get_pk_algorithm` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_sec_param ()

    gnutls_sec_param_t
    gnutls_openpgp_privkey_sec_param (gnutls_openpgp_privkey_t key);

`gnutls_openpgp_privkey_sec_param` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_import ()

    int
    gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key,
                                   const gnutls_datum_t *data,
                                   gnutls_openpgp_crt_fmt_t format,
                                   const char *password,
                                   unsigned int flags);

`gnutls_openpgp_privkey_import` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_fingerprint ()

    int
    gnutls_openpgp_privkey_get_fingerprint
                                   (gnutls_openpgp_privkey_t key,
                                    void *fpr,
                                    size_t *fprlen);

`gnutls_openpgp_privkey_get_fingerprint` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_fingerprint ()

    int
    gnutls_openpgp_privkey_get_subkey_fingerprint
                                   (gnutls_openpgp_privkey_t key,
                                    unsigned int idx,
                                    void *fpr,
                                    size_t *fprlen);

`gnutls_openpgp_privkey_get_subkey_fingerprint` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_key_id ()

    int
    gnutls_openpgp_privkey_get_key_id (gnutls_openpgp_privkey_t key,
                                       gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_privkey_get_key_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_count ()

    int
    gnutls_openpgp_privkey_get_subkey_count
                                   (gnutls_openpgp_privkey_t key);

`gnutls_openpgp_privkey_get_subkey_count` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_idx ()

    int
    gnutls_openpgp_privkey_get_subkey_idx (gnutls_openpgp_privkey_t key,
                                           const gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_privkey_get_subkey_idx` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_revoked_status ()

    int
    gnutls_openpgp_privkey_get_subkey_revoked_status
                                   (gnutls_openpgp_privkey_t key,
                                    unsigned int idx);

`gnutls_openpgp_privkey_get_subkey_revoked_status` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_revoked_status ()

    int
    gnutls_openpgp_privkey_get_revoked_status
                                   (gnutls_openpgp_privkey_t key);

`gnutls_openpgp_privkey_get_revoked_status` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_pk_algorithm ()

    gnutls_pk_algorithm_t
    gnutls_openpgp_privkey_get_subkey_pk_algorithm
                                   (gnutls_openpgp_privkey_t key,
                                    unsigned int idx,
                                    unsigned int *bits);

`gnutls_openpgp_privkey_get_subkey_pk_algorithm` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_expiration_time ()

    time_t
    gnutls_openpgp_privkey_get_subkey_expiration_time
                                   (gnutls_openpgp_privkey_t key,
                                    unsigned int idx);

`gnutls_openpgp_privkey_get_subkey_expiration_time` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_id ()

    int
    gnutls_openpgp_privkey_get_subkey_id (gnutls_openpgp_privkey_t key,
                                          unsigned int idx,
                                          gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_privkey_get_subkey_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_subkey_creation_time ()

    time_t
    gnutls_openpgp_privkey_get_subkey_creation_time
                                   (gnutls_openpgp_privkey_t key,
                                    unsigned int idx);

`gnutls_openpgp_privkey_get_subkey_creation_time` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_export_subkey_dsa_raw ()

    int
    gnutls_openpgp_privkey_export_subkey_dsa_raw
                                   (gnutls_openpgp_privkey_t pkey,
                                    unsigned int idx,
                                    gnutls_datum_t *p,
                                    gnutls_datum_t *q,
                                    gnutls_datum_t *g,
                                    gnutls_datum_t *y,
                                    gnutls_datum_t *x);

`gnutls_openpgp_privkey_export_subkey_dsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_export_subkey_rsa_raw ()

    int
    gnutls_openpgp_privkey_export_subkey_rsa_raw
                                   (gnutls_openpgp_privkey_t pkey,
                                    unsigned int idx,
                                    gnutls_datum_t *m,
                                    gnutls_datum_t *e,
                                    gnutls_datum_t *d,
                                    gnutls_datum_t *p,
                                    gnutls_datum_t *q,
                                    gnutls_datum_t *u);

`gnutls_openpgp_privkey_export_subkey_rsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_export_dsa_raw ()

    int
    gnutls_openpgp_privkey_export_dsa_raw (gnutls_openpgp_privkey_t pkey,
                                           gnutls_datum_t *p,
                                           gnutls_datum_t *q,
                                           gnutls_datum_t *g,
                                           gnutls_datum_t *y,
                                           gnutls_datum_t *x);

`gnutls_openpgp_privkey_export_dsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_export_rsa_raw ()

    int
    gnutls_openpgp_privkey_export_rsa_raw (gnutls_openpgp_privkey_t pkey,
                                           gnutls_datum_t *m,
                                           gnutls_datum_t *e,
                                           gnutls_datum_t *d,
                                           gnutls_datum_t *p,
                                           gnutls_datum_t *q,
                                           gnutls_datum_t *u);

`gnutls_openpgp_privkey_export_rsa_raw` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_export ()

    int
    gnutls_openpgp_privkey_export (gnutls_openpgp_privkey_t key,
                                   gnutls_openpgp_crt_fmt_t format,
                                   const char *password,
                                   unsigned int flags,
                                   void *output_data,
                                   size_t *output_data_size);

`gnutls_openpgp_privkey_export` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_export2 ()

    int
    gnutls_openpgp_privkey_export2 (gnutls_openpgp_privkey_t key,
                                    gnutls_openpgp_crt_fmt_t format,
                                    const char *password,
                                    unsigned int flags,
                                    gnutls_datum_t *out);

`gnutls_openpgp_privkey_export2` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_set_preferred_key_id ()

    int
    gnutls_openpgp_privkey_set_preferred_key_id
                                   (gnutls_openpgp_privkey_t key,
                                    const gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_privkey_set_preferred_key_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_privkey_get_preferred_key_id ()

    int
    gnutls_openpgp_privkey_get_preferred_key_id
                                   (gnutls_openpgp_privkey_t key,
                                    gnutls_openpgp_keyid_t keyid);

`gnutls_openpgp_privkey_get_preferred_key_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_get_auth_subkey ()

    int
    gnutls_openpgp_crt_get_auth_subkey (gnutls_openpgp_crt_t crt,
                                        gnutls_openpgp_keyid_t keyid,
                                        unsigned int flag);

`gnutls_openpgp_crt_get_auth_subkey` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_keyring_init ()

    int
    gnutls_openpgp_keyring_init (gnutls_openpgp_keyring_t *keyring);

`gnutls_openpgp_keyring_init` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_keyring_deinit ()

    void
    gnutls_openpgp_keyring_deinit (gnutls_openpgp_keyring_t keyring);

`gnutls_openpgp_keyring_deinit` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_keyring_import ()

    int
    gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring,
                                   const gnutls_datum_t *data,
                                   gnutls_openpgp_crt_fmt_t format);

`gnutls_openpgp_keyring_import` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_keyring_check_id ()

    int
    gnutls_openpgp_keyring_check_id (gnutls_openpgp_keyring_t ring,
                                     const gnutls_openpgp_keyid_t keyid,
                                     unsigned int flags);

`gnutls_openpgp_keyring_check_id` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_verify_ring ()

    int
    gnutls_openpgp_crt_verify_ring (gnutls_openpgp_crt_t key,
                                    gnutls_openpgp_keyring_t keyring,
                                    unsigned int flags,
                                    unsigned int *verify);

`gnutls_openpgp_crt_verify_ring` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_crt_verify_self ()

    int
    gnutls_openpgp_crt_verify_self (gnutls_openpgp_crt_t key,
                                    unsigned int flags,
                                    unsigned int *verify);

`gnutls_openpgp_crt_verify_self` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_keyring_get_crt ()

    int
    gnutls_openpgp_keyring_get_crt (gnutls_openpgp_keyring_t ring,
                                    unsigned int idx,
                                    gnutls_openpgp_crt_t *cert);

`gnutls_openpgp_keyring_get_crt` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_keyring_get_crt_count ()

    int
    gnutls_openpgp_keyring_get_crt_count (gnutls_openpgp_keyring_t ring);

`gnutls_openpgp_keyring_get_crt_count` is deprecated and should not be used in newly-written code.

### gnutls_openpgp_recv_key_func ()

    int
    (*gnutls_openpgp_recv_key_func) (gnutls_session_t session,
                                     const unsigned char *keyfpr,
                                     unsigned int keyfpr_length,
                                     gnutls_datum_t *key);

A callback of this type is used to retrieve OpenPGP keys. Only useful on the server, and will only be used if the peer send a key fingerprint instead of a full key. See also `gnutls_openpgp_set_recv_key_function()`.

The variable `key` must be allocated using `gnutls_malloc()`.

#### Parameters

session | a TLS session |
keyfpr | key fingerprint |
keyfpr_length | length of key fingerprint |
key | output key. |

#### Returns

On success, `GNUTLS_E_SUCCESS` (zero) is returned, otherwise an error code is returned.

### gnutls_openpgp_set_recv_key_function ()

    void
    gnutls_openpgp_set_recv_key_function (gnutls_session_t session,
                                          gnutls_openpgp_recv_key_func func);

`gnutls_openpgp_set_recv_key_function` is deprecated and should not be used in newly-written code.

### gnutls_certificate_set_openpgp_key ()

    int
    gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t res,
                                        gnutls_openpgp_crt_t crt,
                                        gnutls_openpgp_privkey_t pkey);

`gnutls_certificate_set_openpgp_key` is deprecated and should not be used in newly-written code.

### gnutls_certificate_get_openpgp_key ()

    int
    gnutls_certificate_get_openpgp_key (gnutls_certificate_credentials_t res,
                                        unsigned  index,
                                        gnutls_openpgp_privkey_t *key);

`gnutls_certificate_get_openpgp_key` is deprecated and should not be used in newly-written code.

### gnutls_certificate_get_openpgp_crt ()

    int
    gnutls_certificate_get_openpgp_crt (gnutls_certificate_credentials_t res,
                                        unsigned  index,
                                        gnutls_openpgp_crt_t **crt_list,
                                        unsigned *crt_list_size);

`gnutls_certificate_get_openpgp_crt` is deprecated and should not be used in newly-written code.

### gnutls_certificate_set_openpgp_key_file ()

    int
    gnutls_certificate_set_openpgp_key_file
                                   (gnutls_certificate_credentials_t res,
                                    const char *certfile,
                                    const char *keyfile,
                                    gnutls_openpgp_crt_fmt_t format);

`gnutls_certificate_set_openpgp_key_file` is deprecated and should not be used in newly-written code.

### gnutls_certificate_set_openpgp_key_mem ()

    int
    gnutls_certificate_set_openpgp_key_mem
                                   (gnutls_certificate_credentials_t res,
                                    const gnutls_datum_t *cert,
                                    const gnutls_datum_t *key,
                                    gnutls_openpgp_crt_fmt_t format);

`gnutls_certificate_set_openpgp_key_mem` is deprecated and should not be used in newly-written code.

### gnutls_certificate_set_openpgp_key_file2 ()

    int
    gnutls_certificate_set_openpgp_key_file2
                                   (gnutls_certificate_credentials_t res,
                                    const char *certfile,
                                    const char *keyfile,
                                    const char *subkey_id,
                                    gnutls_openpgp_crt_fmt_t format);

`gnutls_certificate_set_openpgp_key_file2` is deprecated and should not be used in newly-written code.

### gnutls_certificate_set_openpgp_key_mem2 ()

    int
    gnutls_certificate_set_openpgp_key_mem2
                                   (gnutls_certificate_credentials_t res,
                                    const gnutls_datum_t *cert,
                                    const gnutls_datum_t *key,
                                    const char *subkey_id,
                                    gnutls_openpgp_crt_fmt_t format);

`gnutls_certificate_set_openpgp_key_mem2` is deprecated and should not be used in newly-written code.

### gnutls_certificate_set_openpgp_keyring_mem ()

    int
    gnutls_certificate_set_openpgp_keyring_mem
                                   (gnutls_certificate_credentials_t c,
                                    const unsigned char *data,
                                    size_t dlen,
                                    gnutls_openpgp_crt_fmt_t format);

`gnutls_certificate_set_openpgp_keyring_mem` is deprecated and should not be used in newly-written code.

### gnutls_certificate_set_openpgp_keyring_file ()

    int
    gnutls_certificate_set_openpgp_keyring_file
                                   (gnutls_certificate_credentials_t c,
                                    const char *file,
                                    gnutls_openpgp_crt_fmt_t format);

`gnutls_certificate_set_openpgp_keyring_file` is deprecated and should not be used in newly-written code.

## Types and Values

### enum gnutls_openpgp_crt_fmt_t

Enumeration of different OpenPGP key formats.

#### Members

GNUTLS_OPENPGP_FMT_RAW | OpenPGP certificate in raw format. |
GNUTLS_OPENPGP_FMT_BASE64 | OpenPGP certificate in base64 format. |

### GNUTLS_OPENPGP_KEYID_SIZE

    #define GNUTLS_OPENPGP_KEYID_SIZE 8

### GNUTLS_OPENPGP_V4_FINGERPRINT_SIZE

    #define GNUTLS_OPENPGP_V4_FINGERPRINT_SIZE 20

### GNUTLS_OPENPGP_MASTER_KEYID_IDX

    #define GNUTLS_OPENPGP_MASTER_KEYID_IDX INT_MAX