diff options
author | Werner Koch <wk@gnupg.org> | 2008-12-11 18:44:52 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-12-11 18:44:52 +0100 |
commit | 6558568912d600f6c1f66a9dda457ce9264ce1cd (patch) | |
tree | ecdd1f8288b2b3f2a5a19fb4d0b3f274005fdde2 /g10/keyid.c | |
parent | Add option --no-ask for GET_PASSPHRASE. (diff) | |
download | gnupg2-6558568912d600f6c1f66a9dda457ce9264ce1cd.tar.xz gnupg2-6558568912d600f6c1f66a9dda457ce9264ce1cd.zip |
Make gpg not depend on the RIPE-MD160 implementaion in Libgcrypt.
Fix SIG_ID computation.
Diffstat (limited to 'g10/keyid.c')
-rw-r--r-- | g10/keyid.c | 13 |
1 files changed, 6 insertions, 7 deletions
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; |