diff options
Diffstat (limited to 'lib/openpgp/pgp.c')
-rw-r--r-- | lib/openpgp/pgp.c | 20 |
1 files changed, 19 insertions, 1 deletions
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. * |