diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | includes/gnutls/compat.h | 2 | ||||
-rw-r--r-- | lib/openpgp/pgp.c | 20 |
3 files changed, 21 insertions, 4 deletions
@@ -38,7 +38,8 @@ Clarify that srp_base64 is not the same as normal base64. gnutls_openpgp_keyid_t: ADDED, instead of hard-coded 'unsigned char[8]'. gnutls_openpgp_privkey_sign_hash: MODIFIED to account for keyid gnutls_openpgp_keyring_check_id: MODIFIED to account for new keyid type -gnutls_openpgp_crt_get_key_id: MODIFIED to account for new keyid type +gnutls_openpgp_crt_get_key_id: ADDED to account for new keyid type, + obsoletes gnutls_openpgp_crt_get_id(). gnutls_openpgp_privkey_get_id: RENAMED to gnutls_openpgp_privkey_get_key_id gnutls_openpgp_crt_get_revoked_status: ADDED gnutls_openpgp_crt_get_subkey_count: ADDED diff --git a/includes/gnutls/compat.h b/includes/gnutls/compat.h index 280b410d05..ee23e49ad2 100644 --- a/includes/gnutls/compat.h +++ b/includes/gnutls/compat.h @@ -19,8 +19,6 @@ #define _GNUTLS_GCC_ATTR_DEPRECATED #endif -#define gnutls_openpgp_crt_get_id gnutls_openpgp_crt_get_key_id - #define gnutls_cipher_algorithm gnutls_cipher_algorithm_t #define gnutls_kx_algorithm gnutls_kx_algorithm_t #define gnutls_paramsype gnutls_paramsype_t diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c index d36a5c34c9..825521218e 100644 --- a/lib/openpgp/pgp.c +++ b/lib/openpgp/pgp.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation + * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation * * Author: Timo Schulz, Nikos Mavrogiannopoulos * @@ -472,6 +472,24 @@ gnutls_openpgp_crt_get_key_id (gnutls_openpgp_crt_t key, gnutls_openpgp_keyid_t* } /** + * 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. + * + * Deprecated: Use gnutls_openpgp_crt_get_key_id() instead. + **/ +int +gnutls_openpgp_crt_get_id (gnutls_openpgp_crt_t key, unsigned char keyid[8]) +{ + gnutls_openpgp_keyid_t tmp; + int ret = gnutls_openpgp_crt_get_key_id (key, &tmp); + memcpy (keyid, tmp.keyid, sizeof (tmp.keyid)); + return ret; +} + +/** * gnutls_openpgp_crt_get_revoked_status - Gets the revoked status of the key * @key: the structure that contains the OpenPGP public key. * |