diff options
author | Timo Schulz <[email protected]> | 2002-05-31 09:23:24 +0000 |
---|---|---|
committer | Timo Schulz <[email protected]> | 2002-05-31 09:23:24 +0000 |
commit | 5f3acaffa976f08cb00acac45023138b8f925ad5 (patch) | |
tree | 455ce4a09fa6d5058fa5a3ea9d1e4dfd4f444324 | |
parent | * sign.c (write_signature_packets, sign_file, clearsign_file, (diff) | |
download | gnupg-5f3acaffa976f08cb00acac45023138b8f925ad5.tar.gz gnupg-5f3acaffa976f08cb00acac45023138b8f925ad5.zip |
2002-05-31 Timo Schulz <[email protected]>
* pkclist.c (do_show_revocation_reason): Don't use capital
letters for non-interactive output.
(show_revocation_reason): Now it is global.
* pubkey-enc.c (get_it): Show if the key has been revoked.
-rw-r--r-- | g10/ChangeLog | 7 | ||||
-rw-r--r-- | g10/keydb.h | 1 | ||||
-rw-r--r-- | g10/pkclist.c | 6 | ||||
-rw-r--r-- | g10/pubkey-enc.c | 13 |
4 files changed, 17 insertions, 10 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 49ddd629d..c5a41176b 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +2002-05-31 Timo Schulz <[email protected]> + + * pkclist.c (do_show_revocation_reason): Don't use capital + letters for non-interactive output. + (show_revocation_reason): Now it is global. + * pubkey-enc.c (get_it): Show if the key has been revoked. + 2002-05-30 David Shaw <[email protected]> * sign.c (write_signature_packets, sign_file, clearsign_file, diff --git a/g10/keydb.h b/g10/keydb.h index 620772c34..ee2f0c8af 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -162,6 +162,7 @@ int keydb_search_fpr (KEYDB_HANDLE hd, const byte *fpr); /*-- pkclist.c --*/ +void show_revocation_reason( PKT_public_key *pk, int mode ); int check_signatures_trust( PKT_signature *sig ); void release_pk_list( PK_LIST pk_list ); int build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use ); diff --git a/g10/pkclist.c b/g10/pkclist.c index 72af96549..0e10a4b70 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -70,7 +70,7 @@ do_show_revocation_reason( PKT_signature *sig ) else text = NULL; - log_info( _("Reason for revocation: ") ); + log_info( _("reason for revocation: ") ); if( text ) fputs( text, log_stream() ); else @@ -87,7 +87,7 @@ do_show_revocation_reason( PKT_signature *sig ) if( n ) { pp = memchr( p, '\n', n ); nn = pp? pp - p : n; - log_info( _("Revocation comment: ") ); + log_info( _("revocation comment: ") ); print_string( log_stream(), p, nn, 0 ); putc( '\n', log_stream() ); p += nn; n -= nn; @@ -99,7 +99,7 @@ do_show_revocation_reason( PKT_signature *sig ) /* Mode 0: try and find the revocation based on the pk (i.e. check subkeys, etc.) Mode 1: use only the revocation on the main pk */ -static void +void show_revocation_reason( PKT_public_key *pk, int mode ) { /* Hmmm, this is not so easy becuase we have to duplicate the code diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c index d5aacf071..99e7dd648 100644 --- a/g10/pubkey-enc.c +++ b/g10/pubkey-enc.c @@ -244,13 +244,12 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid ) } } - /* FIXME: check wheter the key has been revoked and display - * the revocation reason. Actually the user should know this himself, - * but the sender might not know already and therefor the user - * should get a notice that an revoked key has been used to decode - * the message. The user can than watch out for snakes send by - * one of those Eves outside his paradise :-) - */ + if ( pk->is_revoked ) { + log_info( _("NOTE: key has been revoked") ); + putc( '\n', log_stream() ); + show_revocation_reason( pk, 1 ); + } + release_kbnode (pkb); rc = 0; } |