mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Photo ID support (actually generic "attribute packet" support, but there
is only one attribute packet defined thus far, and it's a picture)
This commit is contained in:
parent
ca058399b0
commit
d560bdac18
16 changed files with 522 additions and 350 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "errors.h"
|
||||
#include "keydb.h"
|
||||
#include "memory.h"
|
||||
#include "photoid.h"
|
||||
#include "util.h"
|
||||
#include "ttyio.h"
|
||||
#include "trustdb.h"
|
||||
|
@ -352,6 +353,10 @@ list_keyblock_print ( KBNODE keyblock, int secret )
|
|||
print_key_data( pk, keyid );
|
||||
any = 1;
|
||||
}
|
||||
|
||||
if(opt.show_photos && node->pkt->pkt.user_id->attribs!=NULL &&
|
||||
node->pkt->pkt.user_id->attribs->type==ATTRIB_JPEG)
|
||||
show_photo(node->pkt->pkt.user_id->attribs,pk);
|
||||
}
|
||||
else if( node->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
|
||||
u32 keyid2[2];
|
||||
|
@ -576,10 +581,10 @@ list_keyblock_colon( KBNODE keyblock, int secret )
|
|||
byte namehash[20];
|
||||
|
||||
if( pk && !ulti_hack ) {
|
||||
if( node->pkt->pkt.user_id->photo )
|
||||
if( node->pkt->pkt.user_id->attrib_data )
|
||||
rmd160_hash_buffer( namehash,
|
||||
node->pkt->pkt.user_id->photo,
|
||||
node->pkt->pkt.user_id->photolen);
|
||||
node->pkt->pkt.user_id->attrib_data,
|
||||
node->pkt->pkt.user_id->attrib_len);
|
||||
else
|
||||
rmd160_hash_buffer( namehash,
|
||||
node->pkt->pkt.user_id->name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue