summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2007-10-19 18:47:12 +0300
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2007-10-19 18:48:04 +0300
commit1fdb085eb3e844ca38b3010b0bdebf63263acce7 (patch)
tree9bda94bb2d8ecd56cc8190bcecdd2d2e7352c365
parent339d7c7716b3c4455f7dc249accb4213d1438df2 (diff)
downloadgnutls-1fdb085eb3e844ca38b3010b0bdebf63263acce7.tar.gz
Renamed gnutls_openpgp_key_t to gnutls_openpgp_cert_t
-rw-r--r--includes/gnutls/gnutls.h.in7
-rw-r--r--includes/gnutls/openpgp.h36
-rw-r--r--lib/auth_cert.c8
-rw-r--r--lib/gnutls_extra_hooks.c6
-rw-r--r--lib/gnutls_extra_hooks.h10
-rw-r--r--libextra/gnutls_extra.c2
-rw-r--r--libextra/gnutls_extra.h4
-rw-r--r--libextra/gnutls_openpgp.c8
-rw-r--r--libextra/openpgp/compat.c8
-rw-r--r--libextra/openpgp/extras.c2
-rw-r--r--libextra/openpgp/openpgp.h34
-rw-r--r--libextra/openpgp/pgp.c40
-rw-r--r--libextra/openpgp/pgpverify.c4
13 files changed, 85 insertions, 84 deletions
diff --git a/includes/gnutls/gnutls.h.in b/includes/gnutls/gnutls.h.in
index aa89d569d1..ff238b36c3 100644
--- a/includes/gnutls/gnutls.h.in
+++ b/includes/gnutls/gnutls.h.in
@@ -960,8 +960,9 @@ extern "C"
GNUTLS_SAN_OTHERNAME_XMPP = 1000
} gnutls_x509_subject_alt_name_t;
- struct gnutls_openpgp_key_int;
- typedef struct gnutls_openpgp_key_int *gnutls_openpgp_key_t;
+ struct gnutls_openpgp_cert_int;
+ typedef struct gnutls_openpgp_cert_int *gnutls_openpgp_cert_t;
+#define gnutls_openpgp_key_t gnutls_openpgp_cert_t
struct gnutls_openpgp_privkey_int;
typedef struct gnutls_openpgp_privkey_int *gnutls_openpgp_privkey_t;
@@ -972,7 +973,7 @@ extern "C"
union cert
{
gnutls_x509_crt_t *x509;
- gnutls_openpgp_key_t pgp;
+ gnutls_openpgp_cert_t pgp;
} cert;
unsigned int ncerts; /* one for pgp keys */
diff --git a/includes/gnutls/openpgp.h b/includes/gnutls/openpgp.h
index 2393ab1967..4529ec30d4 100644
--- a/includes/gnutls/openpgp.h
+++ b/includes/gnutls/openpgp.h
@@ -37,7 +37,7 @@ extern "C"
#include <gnutls/gnutls.h>
#include <gnutls/extra.h>
-/* gnutls_openpgp_key_t should be defined in gnutls.h
+/* gnutls_openpgp_cert_t should be defined in gnutls.h
*/
typedef enum gnutls_openpgp_key_fmt
@@ -45,15 +45,15 @@ extern "C"
GNUTLS_OPENPGP_FMT_BASE64
} gnutls_openpgp_key_fmt_t;
- /* initializes the memory for gnutls_openpgp_key_t struct */
- int gnutls_openpgp_key_init (gnutls_openpgp_key_t * key);
+ /* initializes the memory for gnutls_openpgp_cert_t struct */
+ int gnutls_openpgp_key_init (gnutls_openpgp_cert_t * key);
/* frees all memory */
- void gnutls_openpgp_key_deinit (gnutls_openpgp_key_t key);
+ void gnutls_openpgp_key_deinit (gnutls_openpgp_cert_t key);
- int gnutls_openpgp_key_import (gnutls_openpgp_key_t key,
+ int gnutls_openpgp_key_import (gnutls_openpgp_cert_t key,
const gnutls_datum_t * data,
gnutls_openpgp_key_fmt_t format);
- int gnutls_openpgp_key_export (gnutls_openpgp_key_t key,
+ int gnutls_openpgp_key_export (gnutls_openpgp_cert_t key,
gnutls_openpgp_key_fmt_t format,
void *output_data,
size_t * output_data_size);
@@ -61,27 +61,27 @@ extern "C"
/* The key_usage flags are defined in gnutls.h. They are
* the GNUTLS_KEY_* definitions.
*/
- int gnutls_openpgp_key_get_key_usage (gnutls_openpgp_key_t cert,
+ int gnutls_openpgp_key_get_key_usage (gnutls_openpgp_cert_t cert,
unsigned int *key_usage);
- int gnutls_openpgp_key_get_fingerprint (gnutls_openpgp_key_t key, void *fpr,
+ int gnutls_openpgp_key_get_fingerprint (gnutls_openpgp_cert_t key, void *fpr,
size_t * fprlen);
- int gnutls_openpgp_key_get_name (gnutls_openpgp_key_t key,
+ int gnutls_openpgp_key_get_name (gnutls_openpgp_cert_t key,
int idx, char *buf, size_t * sizeof_buf);
gnutls_pk_algorithm_t
- gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_key_t key,
+ gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_cert_t key,
unsigned int *bits);
- int gnutls_openpgp_key_get_version (gnutls_openpgp_key_t key);
+ int gnutls_openpgp_key_get_version (gnutls_openpgp_cert_t key);
- time_t gnutls_openpgp_key_get_creation_time (gnutls_openpgp_key_t key);
- time_t gnutls_openpgp_key_get_expiration_time (gnutls_openpgp_key_t key);
+ time_t gnutls_openpgp_key_get_creation_time (gnutls_openpgp_cert_t key);
+ time_t gnutls_openpgp_key_get_expiration_time (gnutls_openpgp_cert_t key);
- int gnutls_openpgp_key_get_id (gnutls_openpgp_key_t key,
+ int gnutls_openpgp_key_get_id (gnutls_openpgp_cert_t key,
unsigned char keyid[8]);
- int gnutls_openpgp_key_check_hostname (gnutls_openpgp_key_t key,
+ int gnutls_openpgp_key_check_hostname (gnutls_openpgp_cert_t key,
const char *hostname);
/* privkey stuff.
@@ -116,12 +116,12 @@ extern "C"
unsigned int flags);
- int gnutls_openpgp_key_verify_ring (gnutls_openpgp_key_t key,
+ int gnutls_openpgp_key_verify_ring (gnutls_openpgp_cert_t key,
gnutls_openpgp_keyring_t keyring,
unsigned int flags, unsigned int *verify
/* the output of the verification */ );
- int gnutls_openpgp_key_verify_self (gnutls_openpgp_key_t key,
+ int gnutls_openpgp_key_verify_self (gnutls_openpgp_cert_t key,
unsigned int flags,
unsigned int *verify);
@@ -129,7 +129,7 @@ extern "C"
/* certificate authentication stuff.
*/
int gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t
- res, gnutls_openpgp_key_t key,
+ res, gnutls_openpgp_cert_t key,
gnutls_openpgp_privkey_t pkey);
#ifdef __cplusplus
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index 7c318e9059..3681a7dca9 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -49,7 +49,7 @@
static gnutls_cert *alloc_and_load_x509_certs (gnutls_x509_crt_t * certs,
unsigned);
static gnutls_privkey *alloc_and_load_x509_key (gnutls_x509_privkey_t key);
-static gnutls_cert *alloc_and_load_pgp_certs (gnutls_openpgp_key_t cert);
+static gnutls_cert *alloc_and_load_pgp_certs (gnutls_openpgp_cert_t cert);
static gnutls_privkey *alloc_and_load_pgp_key (const gnutls_openpgp_privkey_t
key);
@@ -1583,7 +1583,7 @@ alloc_and_load_x509_key (gnutls_x509_privkey_t key)
* space for them.
*/
static gnutls_cert *
-alloc_and_load_pgp_certs (gnutls_openpgp_key_t cert)
+alloc_and_load_pgp_certs (gnutls_openpgp_cert_t cert)
{
gnutls_cert *local_certs;
int ret = 0;
@@ -1598,13 +1598,13 @@ alloc_and_load_pgp_certs (gnutls_openpgp_key_t cert)
return NULL;
}
- if (_E_gnutls_openpgp_key_to_gcert == NULL)
+ if (_E_gnutls_openpgp_cert_to_gcert == NULL)
{
gnutls_assert ();
return NULL;
}
- ret = _E_gnutls_openpgp_key_to_gcert (local_certs, cert);
+ ret = _E_gnutls_openpgp_cert_to_gcert (local_certs, cert);
if (ret < 0)
{
gnutls_assert ();
diff --git a/lib/gnutls_extra_hooks.c b/lib/gnutls_extra_hooks.c
index 1b3484c7a0..667270f9df 100644
--- a/lib/gnutls_extra_hooks.c
+++ b/lib/gnutls_extra_hooks.c
@@ -37,7 +37,7 @@ _gnutls_openpgp_fingerprint_func _E_gnutls_openpgp_fingerprint = NULL;
_gnutls_openpgp_key_request_func _E_gnutls_openpgp_request_key = NULL;
_gnutls_openpgp_raw_key_to_gcert_func _E_gnutls_openpgp_raw_key_to_gcert = NULL;
_gnutls_openpgp_raw_privkey_to_gkey_func _E_gnutls_openpgp_raw_privkey_to_gkey = NULL;
-_gnutls_openpgp_key_to_gcert_func _E_gnutls_openpgp_key_to_gcert = NULL;
+_gnutls_openpgp_cert_to_gcert_func _E_gnutls_openpgp_cert_to_gcert = NULL;
_gnutls_openpgp_privkey_to_gkey_func _E_gnutls_openpgp_privkey_to_gkey = NULL;
_gnutls_openpgp_key_deinit_func _E_gnutls_openpgp_key_deinit = NULL;
_gnutls_openpgp_keyring_deinit_func _E_gnutls_openpgp_keyring_deinit = NULL;
@@ -54,7 +54,7 @@ _gnutls_add_openpgp_functions
_gnutls_openpgp_key_request_func request_key,
_gnutls_openpgp_raw_key_to_gcert_func raw_key_to_gcert,
_gnutls_openpgp_raw_privkey_to_gkey_func raw_privkey_to_gkey,
- _gnutls_openpgp_key_to_gcert_func key_to_gcert,
+ _gnutls_openpgp_cert_to_gcert_func key_to_gcert,
_gnutls_openpgp_privkey_to_gkey_func privkey_to_gkey,
_gnutls_openpgp_key_deinit_func key_deinit,
_gnutls_openpgp_keyring_deinit_func keyring_deinit,
@@ -67,7 +67,7 @@ _gnutls_add_openpgp_functions
_E_gnutls_openpgp_request_key = request_key;
_E_gnutls_openpgp_raw_key_to_gcert = raw_key_to_gcert;
_E_gnutls_openpgp_raw_privkey_to_gkey = raw_privkey_to_gkey;
- _E_gnutls_openpgp_key_to_gcert = key_to_gcert;
+ _E_gnutls_openpgp_cert_to_gcert = key_to_gcert;
_E_gnutls_openpgp_privkey_to_gkey = privkey_to_gkey;
_E_gnutls_openpgp_key_deinit = key_deinit;
_E_gnutls_openpgp_keyring_deinit = keyring_deinit;
diff --git a/lib/gnutls_extra_hooks.h b/lib/gnutls_extra_hooks.h
index 4ef8bb4cda..da36addaa1 100644
--- a/lib/gnutls_extra_hooks.h
+++ b/lib/gnutls_extra_hooks.h
@@ -56,15 +56,15 @@ typedef int (*_gnutls_openpgp_raw_privkey_to_gkey_func)
const gnutls_datum_t *,
gnutls_openpgp_key_fmt_t);
-typedef int (*_gnutls_openpgp_key_to_gcert_func)
-(gnutls_cert *, gnutls_openpgp_key_t);
+typedef int (*_gnutls_openpgp_cert_to_gcert_func)
+(gnutls_cert *, gnutls_openpgp_cert_t);
typedef int (*_gnutls_openpgp_privkey_to_gkey_func)
(gnutls_privkey *,
gnutls_openpgp_privkey_t);
typedef void (*_gnutls_openpgp_key_deinit_func)
-(gnutls_openpgp_key_t);
+(gnutls_openpgp_cert_t);
typedef void (*_gnutls_openpgp_keyring_deinit_func)
(gnutls_openpgp_keyring_t);
@@ -85,7 +85,7 @@ extern _gnutls_openpgp_fingerprint_func _E_gnutls_openpgp_fingerprint;
extern _gnutls_openpgp_key_request_func _E_gnutls_openpgp_request_key;
extern _gnutls_openpgp_raw_key_to_gcert_func _E_gnutls_openpgp_raw_key_to_gcert;
extern _gnutls_openpgp_raw_privkey_to_gkey_func _E_gnutls_openpgp_raw_privkey_to_gkey;
-extern _gnutls_openpgp_key_to_gcert_func _E_gnutls_openpgp_key_to_gcert;
+extern _gnutls_openpgp_cert_to_gcert_func _E_gnutls_openpgp_cert_to_gcert;
extern _gnutls_openpgp_privkey_to_gkey_func _E_gnutls_openpgp_privkey_to_gkey;
extern _gnutls_openpgp_key_deinit_func _E_gnutls_openpgp_key_deinit;
extern _gnutls_openpgp_keyring_deinit_func _E_gnutls_openpgp_keyring_deinit;
@@ -99,7 +99,7 @@ extern void _gnutls_add_openpgp_functions
_gnutls_openpgp_key_request_func request_key,
_gnutls_openpgp_raw_key_to_gcert_func raw_key_to_gcert,
_gnutls_openpgp_raw_privkey_to_gkey_func raw_privkey_to_gkey,
- _gnutls_openpgp_key_to_gcert_func key_to_gcert,
+ _gnutls_openpgp_cert_to_gcert_func key_to_gcert,
_gnutls_openpgp_privkey_to_gkey_func privkey_to_gkey,
_gnutls_openpgp_key_deinit_func key_deinit,
_gnutls_openpgp_keyring_deinit_func keyring_deinit,
diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c
index 6dbb79e4bf..efca9566df 100644
--- a/libextra/gnutls_extra.c
+++ b/libextra/gnutls_extra.c
@@ -150,7 +150,7 @@ gnutls_global_init_extra (void)
_gnutls_openpgp_request_key,
_gnutls_openpgp_raw_key_to_gcert,
_gnutls_openpgp_raw_privkey_to_gkey,
- _gnutls_openpgp_key_to_gcert,
+ _gnutls_openpgp_cert_to_gcert,
_gnutls_openpgp_privkey_to_gkey,
gnutls_openpgp_key_deinit,
gnutls_openpgp_keyring_deinit,
diff --git a/libextra/gnutls_extra.h b/libextra/gnutls_extra.h
index 2fc6f63d87..70a34e9838 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_key_t);
+typedef int (*OPENPGP_KEY_TO_GCERT) (gnutls_cert *, gnutls_openpgp_cert_t);
typedef int (*OPENPGP_PRIVKEY_TO_GKEY) (gnutls_privkey *,
gnutls_openpgp_privkey_t);
-typedef void (*OPENPGP_KEY_DEINIT) (gnutls_openpgp_key_t);
+typedef void (*OPENPGP_KEY_DEINIT) (gnutls_openpgp_cert_t);
typedef void (*OPENPGP_PRIVKEY_DEINIT) (gnutls_openpgp_privkey_t);
diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c
index 0b9ec2d232..82066586a6 100644
--- a/libextra/gnutls_openpgp.c
+++ b/libextra/gnutls_openpgp.c
@@ -985,10 +985,10 @@ cleanup:
return ret;
}
-/* Converts a parsed gnutls_openpgp_key_t to a gnutls_cert structure.
+/* Converts a parsed gnutls_openpgp_cert_t to a gnutls_cert structure.
*/
int
-_gnutls_openpgp_key_to_gcert (gnutls_cert * gcert, gnutls_openpgp_key_t cert)
+_gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert)
{
opaque *der;
size_t der_size = 0;
@@ -1054,7 +1054,7 @@ _gnutls_openpgp_key_to_gcert (gnutls_cert * gcert, gnutls_openpgp_key_t cert)
**/
int
gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t
- res, gnutls_openpgp_key_t key,
+ res, gnutls_openpgp_cert_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_key_to_gcert (res->cert_list[res->ncerts], key);
+ ret = _gnutls_openpgp_cert_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 e98b8d1f60..4cc976d5b4 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_key_t key = NULL;
+ gnutls_openpgp_cert_t key = NULL;
unsigned int verify = 0, verify_self = 0;
if (!cert_list || cert_list_length != 1)
@@ -118,7 +118,7 @@ int
_gnutls_openpgp_fingerprint (const gnutls_datum_t * cert,
unsigned char *fpr, size_t * fprlen)
{
- gnutls_openpgp_key_t key;
+ gnutls_openpgp_cert_t key;
int ret;
ret = gnutls_openpgp_key_init (&key);
@@ -155,7 +155,7 @@ _gnutls_openpgp_fingerprint (const gnutls_datum_t * cert,
time_t
_gnutls_openpgp_get_raw_key_creation_time (const gnutls_datum_t * cert)
{
- gnutls_openpgp_key_t key;
+ gnutls_openpgp_cert_t key;
int ret;
time_t tim;
@@ -191,7 +191,7 @@ _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_key_t key;
+ gnutls_openpgp_cert_t key;
int ret;
time_t tim;
diff --git a/libextra/openpgp/extras.c b/libextra/openpgp/extras.c
index 74dda8a5e2..adf534eb32 100644
--- a/libextra/openpgp/extras.c
+++ b/libextra/openpgp/extras.c
@@ -140,7 +140,7 @@ gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring,
cdk_stream_t input;
_gnutls_debug_log ("PGP: keyring import format '%s'\n",
- format == 0? "raw" : "base64");
+ format == GNUTLS_OPENPGP_FMT_RAW? "raw" : "base64");
if (format == GNUTLS_OPENPGP_FMT_RAW)
{
diff --git a/libextra/openpgp/openpgp.h b/libextra/openpgp/openpgp.h
index 620ebf6deb..c6177c2675 100644
--- a/libextra/openpgp/openpgp.h
+++ b/libextra/openpgp/openpgp.h
@@ -17,10 +17,10 @@ typedef enum gnutls_openpgp_key_fmt_t
#include <opencdk.h>
/* Internal context to store the OpenPGP key. */
-typedef struct gnutls_openpgp_key_int
+typedef struct gnutls_openpgp_cert_int
{
cdk_kbnode_t knode;
-} gnutls_openpgp_key_int;
+} gnutls_openpgp_cert_int;
/* Internal context to store the private OpenPGP key. */
@@ -40,25 +40,25 @@ 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_key_get_name (gnutls_openpgp_key_t key,
+int gnutls_openpgp_key_get_name (gnutls_openpgp_cert_t key,
int idx, char *buf, size_t * sizeof_buf);
-int gnutls_openpgp_key_get_fingerprint (gnutls_openpgp_key_t key,
+int gnutls_openpgp_key_get_fingerprint (gnutls_openpgp_cert_t key,
void *fpr, size_t * fprlen);
gnutls_pk_algorithm_t
-gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_cert_t key,
unsigned int *bits);
-int gnutls_openpgp_key_get_version (gnutls_openpgp_key_t key);
-time_t gnutls_openpgp_key_get_creation_time (gnutls_openpgp_key_t key);
-time_t gnutls_openpgp_key_get_expiration_time (gnutls_openpgp_key_t key);
-int gnutls_openpgp_key_get_id (gnutls_openpgp_key_t key,
+int gnutls_openpgp_key_get_version (gnutls_openpgp_cert_t key);
+time_t gnutls_openpgp_key_get_creation_time (gnutls_openpgp_cert_t key);
+time_t gnutls_openpgp_key_get_expiration_time (gnutls_openpgp_cert_t key);
+int gnutls_openpgp_key_get_id (gnutls_openpgp_cert_t key,
unsigned char keyid[8]);
-int gnutls_openpgp_key_init (gnutls_openpgp_key_t * key);
-void gnutls_openpgp_key_deinit (gnutls_openpgp_key_t key);
-int gnutls_openpgp_key_import (gnutls_openpgp_key_t key,
+int gnutls_openpgp_key_init (gnutls_openpgp_cert_t * key);
+void gnutls_openpgp_key_deinit (gnutls_openpgp_cert_t key);
+int gnutls_openpgp_key_import (gnutls_openpgp_cert_t key,
const gnutls_datum_t * data,
gnutls_openpgp_key_fmt_t format);
-int gnutls_openpgp_key_export (gnutls_openpgp_key_t key,
+int gnutls_openpgp_key_export (gnutls_openpgp_cert_t key,
gnutls_openpgp_key_fmt_t format,
void *output_data, size_t * output_data_size);
@@ -71,15 +71,15 @@ int gnutls_openpgp_keyring_check_id (gnutls_openpgp_keyring_t ring,
const unsigned char keyid[8],
unsigned int flags);
-int gnutls_openpgp_key_verify_ring (gnutls_openpgp_key_t key,
+int gnutls_openpgp_key_verify_ring (gnutls_openpgp_cert_t key,
gnutls_openpgp_keyring_t keyring,
unsigned int flags, unsigned int *verify);
-int gnutls_openpgp_key_verify_self (gnutls_openpgp_key_t key,
+int gnutls_openpgp_key_verify_self (gnutls_openpgp_cert_t key,
unsigned int flags, unsigned int *verify);
-int _gnutls_openpgp_key_to_gcert (gnutls_cert * gcert,
- gnutls_openpgp_key_t cert);
+int _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert,
+ gnutls_openpgp_cert_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 69182b4692..15c4f5a1f4 100644
--- a/libextra/openpgp/pgp.c
+++ b/libextra/openpgp/pgp.c
@@ -34,7 +34,7 @@
/**
- * gnutls_openpgp_key_init - This function initializes a gnutls_openpgp_key_t structure
+ * gnutls_openpgp_key_init - This function initializes a gnutls_openpgp_cert_t structure
* @key: The structure to be initialized
*
* This function will initialize an OpenPGP key structure.
@@ -43,9 +43,9 @@
*
**/
int
-gnutls_openpgp_key_init (gnutls_openpgp_key_t * key)
+gnutls_openpgp_key_init (gnutls_openpgp_cert_t * key)
{
- *key = gnutls_calloc (1, sizeof (gnutls_openpgp_key_int));
+ *key = gnutls_calloc (1, sizeof (gnutls_openpgp_cert_int));
if (*key)
return 0; /* success */
@@ -53,13 +53,13 @@ gnutls_openpgp_key_init (gnutls_openpgp_key_t * key)
}
/**
- * gnutls_openpgp_key_deinit - This function deinitializes memory used by a gnutls_openpgp_key_t structure
+ * gnutls_openpgp_key_deinit - This function deinitializes memory used by a gnutls_openpgp_cert_t structure
* @key: The structure to be initialized
*
* This function will deinitialize a key structure.
**/
void
-gnutls_openpgp_key_deinit (gnutls_openpgp_key_t key)
+gnutls_openpgp_key_deinit (gnutls_openpgp_cert_t key)
{
if (!key)
return;
@@ -80,12 +80,12 @@ gnutls_openpgp_key_deinit (gnutls_openpgp_key_t key)
* @format: One of gnutls_openpgp_key_fmt_t elements.
*
* This function will convert the given RAW or Base64 encoded key
- * to the native gnutls_openpgp_key_t format. The output will be stored in 'key'.
+ * to the native gnutls_openpgp_cert_t format. The output will be stored in 'key'.
*
* Returns 0 on success.
**/
int
-gnutls_openpgp_key_import (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_import (gnutls_openpgp_cert_t key,
const gnutls_datum_t * data,
gnutls_openpgp_key_fmt_t format)
{
@@ -134,7 +134,7 @@ gnutls_openpgp_key_import (gnutls_openpgp_key_t key,
*
**/
int
-gnutls_openpgp_key_export (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_export (gnutls_openpgp_cert_t key,
gnutls_openpgp_key_fmt_t format,
void *output_data, size_t * output_data_size)
{
@@ -194,7 +194,7 @@ gnutls_openpgp_key_export (gnutls_openpgp_key_t key,
* the fingerprint can be 16 or 20 bytes.
**/
int
-gnutls_openpgp_key_get_fingerprint (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_get_fingerprint (gnutls_openpgp_cert_t key,
void *fpr, size_t * fprlen)
{
cdk_packet_t pkt;
@@ -224,7 +224,7 @@ gnutls_openpgp_key_get_fingerprint (gnutls_openpgp_key_t key,
}
int
-_gnutls_openpgp_count_key_names (gnutls_openpgp_key_t key)
+_gnutls_openpgp_count_key_names (gnutls_openpgp_cert_t key)
{
cdk_kbnode_t p, ctx;
cdk_packet_t pkt;
@@ -264,7 +264,7 @@ _gnutls_openpgp_count_key_names (gnutls_openpgp_key_t key)
*
**/
int
-gnutls_openpgp_key_get_name (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_get_name (gnutls_openpgp_cert_t key,
int idx, char *buf, size_t * sizeof_buf)
{
cdk_kbnode_t ctx = NULL, p;
@@ -335,7 +335,7 @@ gnutls_openpgp_key_get_name (gnutls_openpgp_key_t key,
*
**/
gnutls_pk_algorithm_t
-gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_cert_t key,
unsigned int *bits)
{
cdk_packet_t pkt;
@@ -370,7 +370,7 @@ gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_key_t key,
* Extract the version of the OpenPGP key.
**/
int
-gnutls_openpgp_key_get_version (gnutls_openpgp_key_t key)
+gnutls_openpgp_key_get_version (gnutls_openpgp_cert_t key)
{
cdk_packet_t pkt;
int version;
@@ -395,7 +395,7 @@ gnutls_openpgp_key_get_version (gnutls_openpgp_key_t key)
* Returns the timestamp when the OpenPGP key was created.
**/
time_t
-gnutls_openpgp_key_get_creation_time (gnutls_openpgp_key_t key)
+gnutls_openpgp_key_get_creation_time (gnutls_openpgp_cert_t key)
{
cdk_packet_t pkt;
time_t timestamp;
@@ -421,7 +421,7 @@ gnutls_openpgp_key_get_creation_time (gnutls_openpgp_key_t key)
* that the key doesn't expire at all.
**/
time_t
-gnutls_openpgp_key_get_expiration_time (gnutls_openpgp_key_t key)
+gnutls_openpgp_key_get_expiration_time (gnutls_openpgp_cert_t key)
{
cdk_packet_t pkt;
time_t expiredate;
@@ -446,7 +446,7 @@ gnutls_openpgp_key_get_expiration_time (gnutls_openpgp_key_t key)
* Returns the 64-bit keyID of the OpenPGP key.
**/
int
-gnutls_openpgp_key_get_id (gnutls_openpgp_key_t key, unsigned char keyid[8])
+gnutls_openpgp_key_get_id (gnutls_openpgp_cert_t key, unsigned char keyid[8])
{
cdk_packet_t pkt;
uint32_t kid[2];
@@ -476,7 +476,7 @@ gnutls_openpgp_key_get_id (gnutls_openpgp_key_t key, unsigned char keyid[8])
/**
* gnutls_openpgp_key_check_hostname - This function compares the given hostname with the hostname in the key
- * @key: should contain an gnutls_openpgp_key_t structure
+ * @key: should contain an gnutls_openpgp_cert_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_key_get_id (gnutls_openpgp_key_t key, unsigned char keyid[8])
*
**/
int
-gnutls_openpgp_key_check_hostname (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_check_hostname (gnutls_openpgp_cert_t key,
const char *hostname)
{
char dnsname[MAX_CN];
@@ -511,7 +511,7 @@ gnutls_openpgp_key_check_hostname (gnutls_openpgp_key_t key,
/**
* gnutls_openpgp_key_get_key_usage - This function returns the key's usage
- * @key: should contain a gnutls_openpgp_key_t structure
+ * @key: should contain a gnutls_openpgp_cert_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_key_check_hostname (gnutls_openpgp_key_t key,
*
*/
int
-gnutls_openpgp_key_get_key_usage (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_get_key_usage (gnutls_openpgp_cert_t key,
unsigned int *key_usage)
{
cdk_packet_t pkt;
diff --git a/libextra/openpgp/pgpverify.c b/libextra/openpgp/pgpverify.c
index 5712d3313b..c1150d1a46 100644
--- a/libextra/openpgp/pgpverify.c
+++ b/libextra/openpgp/pgpverify.c
@@ -56,7 +56,7 @@
* Returns 0 on success.
**/
int
-gnutls_openpgp_key_verify_ring (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_verify_ring (gnutls_openpgp_cert_t key,
gnutls_openpgp_keyring_t keyring,
unsigned int flags, unsigned int *verify)
{
@@ -130,7 +130,7 @@ gnutls_openpgp_key_verify_ring (gnutls_openpgp_key_t key,
* Returns 0 on success.
**/
int
-gnutls_openpgp_key_verify_self (gnutls_openpgp_key_t key,
+gnutls_openpgp_key_verify_self (gnutls_openpgp_cert_t key,
unsigned int flags, unsigned int *verify)
{
int status;