From 6558568912d600f6c1f66a9dda457ce9264ce1cd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 11 Dec 2008 17:44:52 +0000 Subject: Make gpg not depend on the RIPE-MD160 implementaion in Libgcrypt. Fix SIG_ID computation. --- g10/keyid.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'g10/keyid.c') diff --git a/g10/keyid.c b/g10/keyid.c index 9675bbe07..3ba7d4256 100644 --- a/g10/keyid.c +++ b/g10/keyid.c @@ -33,6 +33,7 @@ #include "options.h" #include "keydb.h" #include "i18n.h" +#include "rmd160.h" int pubkey_letter( int algo ) @@ -448,16 +449,14 @@ keyid_from_sig( PKT_signature *sig, u32 *keyid ) byte * namehash_from_uid(PKT_user_id *uid) { - if(uid->namehash==NULL) + if (!uid->namehash) { - uid->namehash = xmalloc(20); - + uid->namehash = xmalloc (20); + if(uid->attrib_data) - gcry_md_hash_buffer (GCRY_MD_RMD160, uid->namehash, - uid->attrib_data, uid->attrib_len); + rmd160_hash_buffer (uid->namehash, uid->attrib_data, uid->attrib_len); else - gcry_md_hash_buffer (GCRY_MD_RMD160, uid->namehash, - uid->name, uid->len); + rmd160_hash_buffer (uid->namehash, uid->name, uid->len); } return uid->namehash; -- cgit v1.2.3