1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

* packet.h, getkey.c (merge_selfsigs, merge_selfsigs_main), pkclist.c

(check_signatures_trust): Indicate who has revoked a key (the owner or a
designated revoker).  If a key was revoked by both, prefer the owner.
This commit is contained in:
David Shaw 2004-01-09 20:32:36 +00:00
parent 006372cf77
commit aeb16fcca1
4 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2004-01-09 David Shaw <dshaw@localhost.localdomain>
* packet.h, getkey.c (merge_selfsigs, merge_selfsigs_main),
pkclist.c (check_signatures_trust): Indicate who has revoked a key
(the owner or a designated revoker). If a key was revoked by
both, prefer the owner.
2004-01-05 David Shaw <dshaw@jabberwocky.com> 2004-01-05 David Shaw <dshaw@jabberwocky.com>
* sig-check.c: Copyright typo. * sig-check.c: Copyright typo.

View File

@ -1521,7 +1521,7 @@ merge_selfsigs_main( KBNODE keyblock, int *r_revoked )
int rc=check_revocation_keys(pk,sig); int rc=check_revocation_keys(pk,sig);
if(rc==0) if(rc==0)
{ {
*r_revoked=1; *r_revoked=2;
/* don't continue checking since we can't be any /* don't continue checking since we can't be any
more revoked than this */ more revoked than this */
break; break;
@ -1973,7 +1973,7 @@ merge_selfsigs( KBNODE keyblock )
if(!main_pk->is_valid) if(!main_pk->is_valid)
pk->is_valid = 0; pk->is_valid = 0;
if(revoked) if(revoked)
pk->is_revoked = 1; pk->is_revoked = revoked;
if(main_pk->has_expired) if(main_pk->has_expired)
pk->has_expired = main_pk->has_expired; pk->has_expired = main_pk->has_expired;
} }

View File

@ -199,7 +199,8 @@ typedef struct {
byte req_usage; /* hack to pass a request to getkey() */ byte req_usage; /* hack to pass a request to getkey() */
byte req_algo; /* Ditto */ byte req_algo; /* Ditto */
u32 has_expired; /* set to the expiration date if expired */ u32 has_expired; /* set to the expiration date if expired */
int is_revoked; /* key has been revoked */ int is_revoked; /* key has been revoked, 1 if by the
owner, 2 if by a designated revoker */
int maybe_revoked; /* a designated revocation is present, but int maybe_revoked; /* a designated revocation is present, but
without the key to check it */ without the key to check it */
int is_valid; /* key (especially subkey) is valid */ int is_valid; /* key (especially subkey) is valid */

View File

@ -606,6 +606,10 @@ check_signatures_trust( PKT_signature *sig )
if ( (trustlevel & TRUST_FLAG_REVOKED) ) if ( (trustlevel & TRUST_FLAG_REVOKED) )
{ {
write_status( STATUS_KEYREVOKED ); write_status( STATUS_KEYREVOKED );
if(pk->is_revoked==2)
log_info(_("WARNING: This key has been revoked by its"
" designated revoker!\n"));
else
log_info(_("WARNING: This key has been revoked by its owner!\n")); log_info(_("WARNING: This key has been revoked by its owner!\n"));
log_info(_(" This could mean that the signature is forgery.\n")); log_info(_(" This could mean that the signature is forgery.\n"));
show_revocation_reason( pk, 0 ); show_revocation_reason( pk, 0 );