mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Make gpg not depend on the RIPE-MD160 implementaion in Libgcrypt.
Fix SIG_ID computation.
This commit is contained in:
parent
c3752d1057
commit
6558568912
10 changed files with 190 additions and 44 deletions
13
g10/keyid.c
13
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue