diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-10-03 09:42:48 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-10-03 09:42:48 +0000 |
commit | 8b99a69401e62d6e8721875fc9900bc887e4099f (patch) | |
tree | 8b023539206d5319a471556747d0747f1c1c7d0d /libextra/openpgp | |
parent | b0a4ea9f5b29c8e04d5c22ff53f9c529419aaa65 (diff) | |
download | gnutls-8b99a69401e62d6e8721875fc9900bc887e4099f.tar.gz |
*** empty log message ***
Diffstat (limited to 'libextra/openpgp')
-rw-r--r-- | libextra/openpgp/gnutls_openpgp.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/libextra/openpgp/gnutls_openpgp.c b/libextra/openpgp/gnutls_openpgp.c index 28d4555641..b10364dfb4 100644 --- a/libextra/openpgp/gnutls_openpgp.c +++ b/libextra/openpgp/gnutls_openpgp.c @@ -915,45 +915,6 @@ leave: } -/** - * gnutls_openpgp_fingerprint - Gets the fingerprint - * @cert: the raw data that contains the OpenPGP public key. - * @fpr: the buffer to save the fingerprint. - * @fprlen: the integer to save the length of the fingerprint. - * - * Returns the fingerprint of the OpenPGP key. Depence on the algorithm, - * the fingerprint can be 16 or 20 bytes. - **/ -int -gnutls_openpgp_fingerprint( const gnutls_datum *cert, - unsigned char *fpr, size_t *fprlen ) -{ - CDK_PACKET *pkt; - cdk_pkt_pubkey_t pk = NULL; - - if( !cert || !fpr || !fprlen ) { - gnutls_assert( ); - return GNUTLS_E_INVALID_REQUEST; - } - - *fprlen = 0; - - pkt = search_packet( cert, CDK_PKT_PUBLIC_KEY ); - if( !pkt ) - return GNUTLS_E_OPENPGP_GETKEY_FAILED; - - pk = pkt->pkt.public_key; - *fprlen = 20; - if ( is_RSA(pk->pubkey_algo) && pk->version < 4 ) - *fprlen = 16; - cdk_pk_get_fingerprint( pk, fpr ); - search_packet( NULL, 0 ); - - return 0; -} - - - /*- * gnutls_openpgp_add_keyring_file - Adds a keyring file for OpenPGP * @keyring: data buffer to store the file. |