diff options
author | Werner Koch <wk@gnupg.org> | 1999-03-02 10:41:49 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1999-03-02 10:41:49 +0100 |
commit | c27c7416d5148865a513e007fb6f0a34993a6073 (patch) | |
tree | 389583ab57cc825586486eedf989e1925695cc5e /g10/trustdb.c | |
parent | See ChangeLog: Sun Feb 28 19:11:00 CET 1999 Werner Koch (diff) | |
download | gnupg2-c27c7416d5148865a513e007fb6f0a34993a6073.tar.xz gnupg2-c27c7416d5148865a513e007fb6f0a34993a6073.zip |
See ChangeLog: Tue Mar 2 10:38:42 CET 1999 Werner Koch
Diffstat (limited to '')
-rw-r--r-- | g10/trustdb.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c index c96de91f4..c40976523 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -996,6 +996,10 @@ collect_paths( int depth, int max_depth, int all, TRUSTREC *drec, typedef struct { ulong lid; ulong uid; + byte uid_flags; + byte uid_validity; + byte dir_flags; + byte ownertrust; } CERT_ITEM; /* structure to hold certification chains. Item[nitems-1] is the @@ -1033,7 +1037,7 @@ add_cert_items_to_set( CERT_CHAIN *set_head, CERT_ITEM *items, int nitems ) /**************** * Find all certification paths of a given LID. - * Limit the search to MAX_DEPTH. stack is a helper variable which + * Limit the search to MAX_DEPTH. stack is a helper variable which * should have been allocated with size max_depth, stack[0] should * be setup to the key we are investigating, so the minimal depth * we should ever see in this function is 1. @@ -1076,6 +1080,9 @@ find_cert_chain( ulong lid, int depth, int max_depth, /* Performance hint: add stuff to ignore this one when the * assigned validity of the key is bad */ + stack[depth].dir_flags = dirrec.r.dir.dirflags; + stack[depth].ownertrust = dirrec.r.dir.ownertrust; + /* loop over all user ids */ for( uidrno = dirrec.r.dir.uidlist; uidrno; uidrno = uidrec.r.uid.next ) { TRUSTREC sigrec; @@ -1083,6 +1090,8 @@ find_cert_chain( ulong lid, int depth, int max_depth, stack[depth].uid = uidrno; read_record( uidrno, &uidrec, RECTYPE_UID ); + stack[depth].uid_flags = uidrec.r.uid.uidflags; + stack[depth].uid_validity = uidrec.r.uid.validity; if( !(uidrec.r.uid.uidflags & UIDF_CHECKED) ) continue; /* user id has not been checked */ @@ -1562,13 +1571,16 @@ list_trust_path( const char *username ) find_cert_chain( lid, 0, opt.max_cert_depth, stack, &chains); m_free( stack ); /* dump chains */ + printf("lid/uid(ownertrust,validity):\n"); for(r=chains; r ; r = r->next ) { printf("chain:" ); for(i=0; i < r->nitems; i++ ) - printf(" %4lu/%-4lu", r->items[i].lid, r->items[i].uid ); + printf(" %lu/%lu(%d,%d)", r->items[i].lid, r->items[i].uid, + r->items[i].ownertrust, + (r->items[i].uid_flags & UIDF_VALVALID )? + r->items[i].uid_validity : 0 ); putchar('\n'); } - } #endif } |