diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2007-10-19 22:05:28 +0300 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2007-10-19 22:05:28 +0300 |
commit | 07837c92f65f09b58c0ec55e3f49382ce0d71ba5 (patch) | |
tree | f9b4a752c1d65fee9595ea09e8654a5fd8ba6877 /libextra | |
parent | 673cd9568589a79d5b4da76cc686acd79d5cbb87 (diff) | |
download | gnutls-07837c92f65f09b58c0ec55e3f49382ce0d71ba5.tar.gz |
Renamed openpgp_cert to openpgp_crt to be consistent with x509.
Diffstat (limited to 'libextra')
-rw-r--r-- | libextra/gnutls_extra.c | 4 | ||||
-rw-r--r-- | libextra/gnutls_extra.h | 4 | ||||
-rw-r--r-- | libextra/gnutls_openpgp.c | 14 | ||||
-rw-r--r-- | libextra/openpgp/compat.c | 42 | ||||
-rw-r--r-- | libextra/openpgp/extras.c | 2 | ||||
-rw-r--r-- | libextra/openpgp/gnutls_openpgp.h | 2 | ||||
-rw-r--r-- | libextra/openpgp/openpgp.h | 44 | ||||
-rw-r--r-- | libextra/openpgp/pgp.c | 72 | ||||
-rw-r--r-- | libextra/openpgp/pgpverify.c | 10 | ||||
-rw-r--r-- | libextra/openpgp/privkey.c | 4 |
10 files changed, 99 insertions, 99 deletions
diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c index fde3388fbc..313145d8dc 100644 --- a/libextra/gnutls_extra.c +++ b/libextra/gnutls_extra.c @@ -150,9 +150,9 @@ gnutls_global_init_extra (void) _gnutls_openpgp_request_key, _gnutls_openpgp_raw_key_to_gcert, _gnutls_openpgp_raw_privkey_to_gkey, - _gnutls_openpgp_cert_to_gcert, + _gnutls_openpgp_crt_to_gcert, _gnutls_openpgp_privkey_to_gkey, - gnutls_openpgp_cert_deinit, + gnutls_openpgp_crt_deinit, gnutls_openpgp_keyring_deinit, gnutls_openpgp_privkey_deinit); diff --git a/libextra/gnutls_extra.h b/libextra/gnutls_extra.h index 70a34e9838..d5cf897345 100644 --- a/libextra/gnutls_extra.h +++ b/libextra/gnutls_extra.h @@ -43,8 +43,8 @@ typedef int (*OPENPGP_RAW_KEY_TO_GCERT) (gnutls_cert *, typedef int (*OPENPGP_RAW_PRIVKEY_TO_GKEY) (gnutls_privkey *, const gnutls_datum_t *); -typedef int (*OPENPGP_KEY_TO_GCERT) (gnutls_cert *, gnutls_openpgp_cert_t); +typedef int (*OPENPGP_KEY_TO_GCERT) (gnutls_cert *, gnutls_openpgp_crt_t); typedef int (*OPENPGP_PRIVKEY_TO_GKEY) (gnutls_privkey *, gnutls_openpgp_privkey_t); -typedef void (*OPENPGP_KEY_DEINIT) (gnutls_openpgp_cert_t); +typedef void (*OPENPGP_KEY_DEINIT) (gnutls_openpgp_crt_t); typedef void (*OPENPGP_PRIVKEY_DEINIT) (gnutls_openpgp_privkey_t); diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index cc867975da..8151deed04 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -307,7 +307,7 @@ openpgp_pk_to_gnutls_cert (gnutls_cert * cert, cdk_pkt_pubkey_t pk) int _gnutls_openpgp_raw_privkey_to_gkey (gnutls_privkey * pkey, const gnutls_datum_t * raw_key, - gnutls_openpgp_cert_fmt_t format) + gnutls_openpgp_crt_fmt_t format) { cdk_kbnode_t snode = NULL; cdk_packet_t pkt; @@ -985,10 +985,10 @@ cleanup: return ret; } -/* Converts a parsed gnutls_openpgp_cert_t to a gnutls_cert structure. +/* Converts a parsed gnutls_openpgp_crt_t to a gnutls_cert structure. */ int -_gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) +_gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert, gnutls_openpgp_crt_t cert) { opaque *der; size_t der_size = 0; @@ -999,7 +999,7 @@ _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) gcert->cert_type = GNUTLS_CRT_OPENPGP; - ret = gnutls_openpgp_cert_export (cert, GNUTLS_OPENPGP_FMT_RAW, + ret = gnutls_openpgp_crt_export (cert, GNUTLS_OPENPGP_FMT_RAW, NULL, &der_size); if (ret != GNUTLS_E_SHORT_MEMORY_BUFFER) { @@ -1014,7 +1014,7 @@ _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) return GNUTLS_E_MEMORY_ERROR; } - ret = gnutls_openpgp_cert_export (cert, GNUTLS_OPENPGP_FMT_RAW, + ret = gnutls_openpgp_crt_export (cert, GNUTLS_OPENPGP_FMT_RAW, der, &der_size); if (ret < 0) { @@ -1054,7 +1054,7 @@ _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) **/ int gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t - res, gnutls_openpgp_cert_t key, + res, gnutls_openpgp_crt_t key, gnutls_openpgp_privkey_t pkey) { int ret; @@ -1105,7 +1105,7 @@ gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t res->cert_list_length[res->ncerts] = 1; - ret = _gnutls_openpgp_cert_to_gcert (res->cert_list[res->ncerts], key); + ret = _gnutls_openpgp_crt_to_gcert (res->cert_list[res->ncerts], key); if (ret < 0) { gnutls_assert (); diff --git a/libextra/openpgp/compat.c b/libextra/openpgp/compat.c index 3f7328c516..4f7e784108 100644 --- a/libextra/openpgp/compat.c +++ b/libextra/openpgp/compat.c @@ -50,7 +50,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, int cert_list_length, unsigned int *status) { int ret = 0; - gnutls_openpgp_cert_t key = NULL; + gnutls_openpgp_crt_t key = NULL; unsigned int verify = 0, verify_self = 0; if (!cert_list || cert_list_length != 1) @@ -59,14 +59,14 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, return GNUTLS_E_NO_CERTIFICATE_FOUND; } - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, &cert_list[0], GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, &cert_list[0], GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); @@ -75,7 +75,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, if (cred->keyring != NULL) { - ret = gnutls_openpgp_cert_verify_ring (key, cred->keyring, 0, &verify); + ret = gnutls_openpgp_crt_verify_ring (key, cred->keyring, 0, &verify); if (ret < 0) { gnutls_assert (); @@ -84,7 +84,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, } /* Now try the self signature. */ - ret = gnutls_openpgp_cert_verify_self (key, 0, &verify_self); + ret = gnutls_openpgp_crt_verify_self (key, 0, &verify_self); if (ret < 0) { gnutls_assert (); @@ -100,7 +100,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, ret = 0; leave: - gnutls_openpgp_cert_deinit (key); + gnutls_openpgp_crt_deinit (key); return ret; } @@ -118,25 +118,25 @@ int _gnutls_openpgp_fingerprint (const gnutls_datum_t * cert, unsigned char *fpr, size_t * fprlen) { - gnutls_openpgp_cert_t key; + gnutls_openpgp_crt_t key; int ret; - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_get_fingerprint (key, fpr, fprlen); - gnutls_openpgp_cert_deinit (key); + ret = gnutls_openpgp_crt_get_fingerprint (key, fpr, fprlen); + gnutls_openpgp_crt_deinit (key); if (ret < 0) { gnutls_assert (); @@ -155,27 +155,27 @@ _gnutls_openpgp_fingerprint (const gnutls_datum_t * cert, time_t _gnutls_openpgp_get_raw_key_creation_time (const gnutls_datum_t * cert) { - gnutls_openpgp_cert_t key; + gnutls_openpgp_crt_t key; int ret; time_t tim; - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); return ret; } - tim = gnutls_openpgp_cert_get_creation_time (key); + tim = gnutls_openpgp_crt_get_creation_time (key); - gnutls_openpgp_cert_deinit (key); + gnutls_openpgp_crt_deinit (key); return tim; } @@ -191,27 +191,27 @@ _gnutls_openpgp_get_raw_key_creation_time (const gnutls_datum_t * cert) time_t _gnutls_openpgp_get_raw_key_expiration_time (const gnutls_datum_t * cert) { - gnutls_openpgp_cert_t key; + gnutls_openpgp_crt_t key; int ret; time_t tim; - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); return ret; } - tim = gnutls_openpgp_cert_get_expiration_time (key); + tim = gnutls_openpgp_crt_get_expiration_time (key); - gnutls_openpgp_cert_deinit (key); + gnutls_openpgp_crt_deinit (key); return tim; } diff --git a/libextra/openpgp/extras.c b/libextra/openpgp/extras.c index db3355530f..da14987fb6 100644 --- a/libextra/openpgp/extras.c +++ b/libextra/openpgp/extras.c @@ -134,7 +134,7 @@ gnutls_openpgp_keyring_check_id (gnutls_openpgp_keyring_t ring, int gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring, const gnutls_datum_t *data, - gnutls_openpgp_cert_fmt_t format) + gnutls_openpgp_crt_fmt_t format) { cdk_error_t err; cdk_stream_t input; diff --git a/libextra/openpgp/gnutls_openpgp.h b/libextra/openpgp/gnutls_openpgp.h index 79d81c6984..9c4124dbac 100644 --- a/libextra/openpgp/gnutls_openpgp.h +++ b/libextra/openpgp/gnutls_openpgp.h @@ -66,7 +66,7 @@ int _gnutls_openpgp_raw_key_to_gcert (gnutls_cert * cert, int _gnutls_openpgp_raw_privkey_to_gkey (gnutls_privkey * pkey, const gnutls_datum_t * raw_key, - gnutls_openpgp_cert_fmt_t format); + gnutls_openpgp_crt_fmt_t format); int _gnutls_openpgp_request_key (gnutls_session_t, diff --git a/libextra/openpgp/openpgp.h b/libextra/openpgp/openpgp.h index 5d1bdde777..84a1ad7625 100644 --- a/libextra/openpgp/openpgp.h +++ b/libextra/openpgp/openpgp.h @@ -6,21 +6,21 @@ #endif /* The format the OpenPGP key is stored in. */ -typedef enum gnutls_openpgp_cert_fmt_t +typedef enum gnutls_openpgp_crt_fmt_t { GNUTLS_OPENPGP_FMT_RAW, GNUTLS_OPENPGP_FMT_BASE64 -} gnutls_openpgp_cert_fmt_t; +} gnutls_openpgp_crt_fmt_t; #ifdef ENABLE_OPENPGP #include <opencdk.h> /* Internal context to store the OpenPGP key. */ -typedef struct gnutls_openpgp_cert_int +typedef struct gnutls_openpgp_crt_int { cdk_kbnode_t knode; -} gnutls_openpgp_cert_int; +} gnutls_openpgp_crt_int; /* Internal context to store the private OpenPGP key. */ @@ -40,46 +40,46 @@ typedef struct gnutls_openpgp_keyring_int typedef struct gnutls_openpgp_keyring_int *gnutls_openpgp_keyring_t; int _gnutls_map_cdk_rc (int rc); -int gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_get_name (gnutls_openpgp_crt_t key, int idx, char *buf, size_t * sizeof_buf); -int gnutls_openpgp_cert_get_fingerprint (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_get_fingerprint (gnutls_openpgp_crt_t key, void *fpr, size_t * fprlen); gnutls_pk_algorithm_t -gnutls_openpgp_cert_get_pk_algorithm (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key, unsigned int *bits); -int gnutls_openpgp_cert_get_version (gnutls_openpgp_cert_t key); -time_t gnutls_openpgp_cert_get_creation_time (gnutls_openpgp_cert_t key); -time_t gnutls_openpgp_cert_get_expiration_time (gnutls_openpgp_cert_t key); -int gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key); +time_t gnutls_openpgp_crt_get_creation_time (gnutls_openpgp_crt_t key); +time_t gnutls_openpgp_crt_get_expiration_time (gnutls_openpgp_crt_t key); +int gnutls_openpgp_crt_get_id (gnutls_openpgp_crt_t key, unsigned char keyid[8]); -int gnutls_openpgp_cert_init (gnutls_openpgp_cert_t * key); -void gnutls_openpgp_cert_deinit (gnutls_openpgp_cert_t key); -int gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_init (gnutls_openpgp_crt_t * key); +void gnutls_openpgp_crt_deinit (gnutls_openpgp_crt_t key); +int gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format); -int gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, - gnutls_openpgp_cert_fmt_t format, + gnutls_openpgp_crt_fmt_t format); +int gnutls_openpgp_crt_export (gnutls_openpgp_crt_t key, + gnutls_openpgp_crt_fmt_t format, void *output_data, size_t * output_data_size); void gnutls_openpgp_keyring_deinit (gnutls_openpgp_keyring_t keyring); int gnutls_openpgp_keyring_init (gnutls_openpgp_keyring_t * keyring); int gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format); + gnutls_openpgp_crt_fmt_t format); int gnutls_openpgp_keyring_check_id (gnutls_openpgp_keyring_t ring, const unsigned char keyid[8], unsigned int flags); -int gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_verify_ring (gnutls_openpgp_crt_t key, gnutls_openpgp_keyring_t keyring, unsigned int flags, unsigned int *verify); -int gnutls_openpgp_cert_verify_self (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_verify_self (gnutls_openpgp_crt_t key, unsigned int flags, unsigned int *verify); -int _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, - gnutls_openpgp_cert_t cert); +int _gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert, + gnutls_openpgp_crt_t cert); int _gnutls_openpgp_privkey_to_gkey (gnutls_privkey * dest, gnutls_openpgp_privkey_t src); diff --git a/libextra/openpgp/pgp.c b/libextra/openpgp/pgp.c index ae0f42f92b..2e17b7d99b 100644 --- a/libextra/openpgp/pgp.c +++ b/libextra/openpgp/pgp.c @@ -34,7 +34,7 @@ /** - * gnutls_openpgp_cert_init - This function initializes a gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_init - This function initializes a gnutls_openpgp_crt_t structure * @key: The structure to be initialized * * This function will initialize an OpenPGP key structure. @@ -43,9 +43,9 @@ * **/ int -gnutls_openpgp_cert_init (gnutls_openpgp_cert_t * key) +gnutls_openpgp_crt_init (gnutls_openpgp_crt_t * key) { - *key = gnutls_calloc (1, sizeof (gnutls_openpgp_cert_int)); + *key = gnutls_calloc (1, sizeof (gnutls_openpgp_crt_int)); if (*key) return 0; /* success */ @@ -53,13 +53,13 @@ gnutls_openpgp_cert_init (gnutls_openpgp_cert_t * key) } /** - * gnutls_openpgp_cert_deinit - This function deinitializes memory used by a gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_deinit - This function deinitializes memory used by a gnutls_openpgp_crt_t structure * @key: The structure to be initialized * * This function will deinitialize a key structure. **/ void -gnutls_openpgp_cert_deinit (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_deinit (gnutls_openpgp_crt_t key) { if (!key) return; @@ -74,20 +74,20 @@ gnutls_openpgp_cert_deinit (gnutls_openpgp_cert_t key) } /** - * gnutls_openpgp_cert_import - This function will import a RAW or BASE64 encoded key + * gnutls_openpgp_crt_import - This function will import a RAW or BASE64 encoded key * @key: The structure to store the parsed key. * @data: The RAW or BASE64 encoded key. - * @format: One of gnutls_openpgp_cert_fmt_t elements. + * @format: One of gnutls_openpgp_crt_fmt_t elements. * * This function will convert the given RAW or Base64 encoded key - * to the native gnutls_openpgp_cert_t format. The output will be stored in 'key'. + * to the native gnutls_openpgp_crt_t format. The output will be stored in 'key'. * * Returns 0 on success. **/ int -gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format) + gnutls_openpgp_crt_fmt_t format) { cdk_stream_t inp; int rc; @@ -120,9 +120,9 @@ gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, } /** - * gnutls_openpgp_cert_export - This function will export a RAW or BASE64 encoded key + * gnutls_openpgp_crt_export - This function will export a RAW or BASE64 encoded key * @key: Holds the key. - * @format: One of gnutls_openpgp_cert_fmt_t elements. + * @format: One of gnutls_openpgp_crt_fmt_t elements. * @output_data: will contain the key base64 encoded or raw * @output_data_size: holds the size of output_data (and will be replaced by the actual size of parameters) * @@ -134,8 +134,8 @@ gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, * **/ int -gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, - gnutls_openpgp_cert_fmt_t format, +gnutls_openpgp_crt_export (gnutls_openpgp_crt_t key, + gnutls_openpgp_crt_fmt_t format, void *output_data, size_t * output_data_size) { size_t input_data_size = *output_data_size; @@ -185,7 +185,7 @@ gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, /** - * gnutls_openpgp_cert_get_fingerprint - Gets the fingerprint + * gnutls_openpgp_crt_get_fingerprint - Gets the fingerprint * @key: the raw data that contains the OpenPGP public key. * @fpr: the buffer to save the fingerprint, must hold at least 20 bytes. * @fprlen: the integer to save the length of the fingerprint. @@ -194,7 +194,7 @@ gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, * the fingerprint can be 16 or 20 bytes. **/ int -gnutls_openpgp_cert_get_fingerprint (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_fingerprint (gnutls_openpgp_crt_t key, void *fpr, size_t * fprlen) { cdk_packet_t pkt; @@ -224,7 +224,7 @@ gnutls_openpgp_cert_get_fingerprint (gnutls_openpgp_cert_t key, } int -_gnutls_openpgp_count_key_names (gnutls_openpgp_cert_t key) +_gnutls_openpgp_count_key_names (gnutls_openpgp_crt_t key) { cdk_kbnode_t p, ctx; cdk_packet_t pkt; @@ -250,7 +250,7 @@ _gnutls_openpgp_count_key_names (gnutls_openpgp_cert_t key) /** - * gnutls_openpgp_cert_get_name - Extracts the userID + * gnutls_openpgp_crt_get_name - Extracts the userID * @key: the structure that contains the OpenPGP public key. * @idx: the index of the ID to extract * @buf: a pointer to a structure to hold the name @@ -264,7 +264,7 @@ _gnutls_openpgp_count_key_names (gnutls_openpgp_cert_t key) * **/ int -gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_name (gnutls_openpgp_crt_t key, int idx, char *buf, size_t * sizeof_buf) { cdk_kbnode_t ctx = NULL, p; @@ -319,7 +319,7 @@ gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, } /** - * gnutls_openpgp_cert_get_pk_algorithm - This function returns the key's PublicKey algorithm + * gnutls_openpgp_crt_get_pk_algorithm - This function returns the key's PublicKey algorithm * @key: is an OpenPGP key * @bits: if bits is non null it will hold the size of the parameters' in bits * @@ -335,7 +335,7 @@ gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, * **/ gnutls_pk_algorithm_t -gnutls_openpgp_cert_get_pk_algorithm (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key, unsigned int *bits) { cdk_packet_t pkt; @@ -364,13 +364,13 @@ gnutls_openpgp_cert_get_pk_algorithm (gnutls_openpgp_cert_t key, /** - * gnutls_openpgp_cert_get_version - Extracts the version of the key. + * gnutls_openpgp_crt_get_version - Extracts the version of the key. * @key: the structure that contains the OpenPGP public key. * * Extract the version of the OpenPGP key. **/ int -gnutls_openpgp_cert_get_version (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key) { cdk_packet_t pkt; int version; @@ -389,13 +389,13 @@ gnutls_openpgp_cert_get_version (gnutls_openpgp_cert_t key) /** - * gnutls_openpgp_cert_get_creation_time - Extract the timestamp + * gnutls_openpgp_crt_get_creation_time - Extract the timestamp * @key: the structure that contains the OpenPGP public key. * * Returns the timestamp when the OpenPGP key was created. **/ time_t -gnutls_openpgp_cert_get_creation_time (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_get_creation_time (gnutls_openpgp_crt_t key) { cdk_packet_t pkt; time_t timestamp; @@ -414,14 +414,14 @@ gnutls_openpgp_cert_get_creation_time (gnutls_openpgp_cert_t key) /** - * gnutls_openpgp_cert_get_expiration_time - Extract the expire date + * gnutls_openpgp_crt_get_expiration_time - Extract the expire date * @key: the structure that contains the OpenPGP public key. * * Returns the time when the OpenPGP key expires. A value of '0' means * that the key doesn't expire at all. **/ time_t -gnutls_openpgp_cert_get_expiration_time (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_get_expiration_time (gnutls_openpgp_crt_t key) { cdk_packet_t pkt; time_t expiredate; @@ -439,14 +439,14 @@ gnutls_openpgp_cert_get_expiration_time (gnutls_openpgp_cert_t key) } /** - * gnutls_openpgp_cert_get_id - Gets the keyID + * gnutls_openpgp_crt_get_id - Gets the keyID * @key: the structure that contains the OpenPGP public key. * @keyid: the buffer to save the keyid. * * Returns the 64-bit keyID of the OpenPGP key. **/ int -gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, unsigned char keyid[8]) +gnutls_openpgp_crt_get_id (gnutls_openpgp_crt_t key, unsigned char keyid[8]) { cdk_packet_t pkt; uint32_t kid[2]; @@ -475,8 +475,8 @@ gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, unsigned char keyid[8]) } /** - * gnutls_openpgp_cert_check_hostname - This function compares the given hostname with the hostname in the key - * @key: should contain an gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_check_hostname - This function compares the given hostname with the hostname in the key + * @key: should contain an gnutls_openpgp_crt_t structure * @hostname: A null terminated string that contains a DNS name * * This function will check if the given key's owner matches @@ -487,7 +487,7 @@ gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, unsigned char keyid[8]) * **/ int -gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_check_hostname (gnutls_openpgp_crt_t key, const char *hostname) { char dnsname[MAX_CN]; @@ -499,7 +499,7 @@ gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, for (i = 0; !(ret < 0); i++) { dnsnamesize = sizeof (dnsname); - ret = gnutls_openpgp_cert_get_name (key, i, dnsname, &dnsnamesize); + ret = gnutls_openpgp_crt_get_name (key, i, dnsname, &dnsnamesize); /* FIXME: ret is not used */ if (_gnutls_hostname_compare (dnsname, hostname)) return 1; @@ -510,8 +510,8 @@ gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, } /** - * gnutls_openpgp_cert_get_key_usage - This function returns the key's usage - * @key: should contain a gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_get_key_usage - This function returns the key's usage + * @key: should contain a gnutls_openpgp_crt_t structure * @key_usage: where the key usage bits will be stored * * This function will return certificate's key usage, by checking the @@ -522,7 +522,7 @@ gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, * */ int -gnutls_openpgp_cert_get_key_usage (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_key_usage (gnutls_openpgp_crt_t key, unsigned int *key_usage) { cdk_packet_t pkt; diff --git a/libextra/openpgp/pgpverify.c b/libextra/openpgp/pgpverify.c index ba48947544..5130d441a7 100644 --- a/libextra/openpgp/pgpverify.c +++ b/libextra/openpgp/pgpverify.c @@ -34,7 +34,7 @@ /** - * gnutls_openpgp_cert_verify_ring - Verify all signatures in the key + * gnutls_openpgp_crt_verify_ring - Verify all signatures in the key * @key: the structure that holds the key. * @keyring: holds the keyring to check against * @flags: unused (should be 0) @@ -56,7 +56,7 @@ * Returns 0 on success. **/ int -gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_verify_ring (gnutls_openpgp_crt_t key, gnutls_openpgp_keyring_t keyring, unsigned int flags, unsigned int *verify) { @@ -98,7 +98,7 @@ gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, /* Check if the key is included in the ring. */ if (!(flags & GNUTLS_VERIFY_DO_NOT_ALLOW_SAME)) { - rc = gnutls_openpgp_cert_get_id (key, id); + rc = gnutls_openpgp_crt_get_id (key, id); if (rc < 0) { gnutls_assert (); @@ -116,7 +116,7 @@ gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, /** - * gnutls_openpgp_cert_verify_self - Verify the self signature on the key + * gnutls_openpgp_crt_verify_self - Verify the self signature on the key * @key: the structure that holds the key. * @flags: unused (should be 0) * @verify: will hold the key verification output. @@ -130,7 +130,7 @@ gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, * Returns 0 on success. **/ int -gnutls_openpgp_cert_verify_self (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_verify_self (gnutls_openpgp_crt_t key, unsigned int flags, unsigned int *verify) { int status; diff --git a/libextra/openpgp/privkey.c b/libextra/openpgp/privkey.c index 632d2a42f5..939400e63e 100644 --- a/libextra/openpgp/privkey.c +++ b/libextra/openpgp/privkey.c @@ -74,7 +74,7 @@ gnutls_openpgp_privkey_deinit (gnutls_openpgp_privkey_t key) * gnutls_openpgp_privkey_import - This function will import a RAW or BASE64 encoded key * @key: The structure to store the parsed key. * @data: The RAW or BASE64 encoded key. - * @format: One of gnutls_openpgp_cert_fmt_t elements. + * @format: One of gnutls_openpgp_crt_fmt_t elements. * @pass: Unused for now * @flags: should be zero * @@ -87,7 +87,7 @@ gnutls_openpgp_privkey_deinit (gnutls_openpgp_privkey_t key) int gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format, + gnutls_openpgp_crt_fmt_t format, const char *pass, unsigned int flags) { int rc; |