aboutsummaryrefslogtreecommitdiffstats
path: root/g10/trustdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/trustdb.c')
-rw-r--r--g10/trustdb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c
index 78ff3de56..e239306b4 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -725,7 +725,10 @@ print_uid_from_keyblock( FILE *fp, KBNODE keyblock, ulong urecno )
if( node->pkt->pkttype == PKT_USER_ID ) {
PKT_user_id *uidpkt = node->pkt->pkt.user_id;
- rmd160_hash_buffer( uhash, uidpkt->name, uidpkt->len );
+ if( uidpkt->photo )
+ rmd160_hash_buffer( uhash, uidpkt->photo, uidpkt->photolen );
+ else
+ rmd160_hash_buffer( uhash, uidpkt->name, uidpkt->len );
if( !memcmp( uhash, urec.r.uid.namehash, 20 ) ) {
print_string( fp, uidpkt->name, uidpkt->len, ':' );
return;
@@ -1379,7 +1382,10 @@ make_uid_records( KBNODE keyblock, ulong lid, u32 *keyid, u32 *min_expire,
if( node->pkt->pkttype != PKT_USER_ID )
continue;
uid = node->pkt->pkt.user_id;
- rmd160_hash_buffer( uidhash, uid->name, uid->len );
+ if( uid->photo )
+ rmd160_hash_buffer( uidhash, uid->photo, uid->photolen );
+ else
+ rmd160_hash_buffer( uidhash, uid->name, uid->len );
/* create the uid record */
u = m_alloc_clear( sizeof *u );