diff options
author | David Shaw <[email protected]> | 2004-01-09 20:32:36 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-01-09 20:32:36 +0000 |
commit | aeb16fcca19cb10141c11da824c7c28796f8b426 (patch) | |
tree | 534e9b9f464bbc2ea3ba41aa6d99992082fd45a4 | |
parent | * gpg.sgml: Fix a few minor typos. Clarify what --textmode is useful for. (diff) | |
download | gnupg-aeb16fcca19cb10141c11da824c7c28796f8b426.tar.gz gnupg-aeb16fcca19cb10141c11da824c7c28796f8b426.zip |
* 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.
-rw-r--r-- | g10/ChangeLog | 7 | ||||
-rw-r--r-- | g10/getkey.c | 4 | ||||
-rw-r--r-- | g10/packet.h | 3 | ||||
-rw-r--r-- | g10/pkclist.c | 6 |
4 files changed, 16 insertions, 4 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 4b9da7248..6cb69747d 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +2004-01-09 David Shaw <[email protected]> + + * 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 <[email protected]> * sig-check.c: Copyright typo. diff --git a/g10/getkey.c b/g10/getkey.c index a1d0c515a..cf06ad62d 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -1521,7 +1521,7 @@ merge_selfsigs_main( KBNODE keyblock, int *r_revoked ) int rc=check_revocation_keys(pk,sig); if(rc==0) { - *r_revoked=1; + *r_revoked=2; /* don't continue checking since we can't be any more revoked than this */ break; @@ -1973,7 +1973,7 @@ merge_selfsigs( KBNODE keyblock ) if(!main_pk->is_valid) pk->is_valid = 0; if(revoked) - pk->is_revoked = 1; + pk->is_revoked = revoked; if(main_pk->has_expired) pk->has_expired = main_pk->has_expired; } diff --git a/g10/packet.h b/g10/packet.h index 7c6a27222..970387387 100644 --- a/g10/packet.h +++ b/g10/packet.h @@ -199,7 +199,8 @@ typedef struct { byte req_usage; /* hack to pass a request to getkey() */ byte req_algo; /* Ditto */ 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 without the key to check it */ int is_valid; /* key (especially subkey) is valid */ diff --git a/g10/pkclist.c b/g10/pkclist.c index 96a373bb0..4bedc5560 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -606,7 +606,11 @@ check_signatures_trust( PKT_signature *sig ) if ( (trustlevel & TRUST_FLAG_REVOKED) ) { write_status( STATUS_KEYREVOKED ); - log_info(_("WARNING: This key has been revoked by its owner!\n")); + 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(_(" This could mean that the signature is forgery.\n")); show_revocation_reason( pk, 0 ); } |