aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-05-20 02:51:23 +0000
committerDavid Shaw <[email protected]>2004-05-20 02:51:23 +0000
commit3cef407e0629630f485e166153695669aca68438 (patch)
treecacc6dd75fc4ac1912edfac9adfa914a60ffc943
parent* sign.c (update_keysig_packet): Policies and notations should be stripped (diff)
downloadgnupg-3cef407e0629630f485e166153695669aca68438.tar.gz
gnupg-3cef407e0629630f485e166153695669aca68438.zip
* pubkey-enc.c (get_session_key, get_it), keyedit.c
(show_key_with_all_names, show_basic_key_info): --keyid-format conversion.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/keyedit.c42
-rw-r--r--g10/pubkey-enc.c8
3 files changed, 32 insertions, 24 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 8aae0309a..96d663be1 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,9 @@
+2004-05-19 David Shaw <[email protected]>
+
+ * pubkey-enc.c (get_session_key, get_it), keyedit.c
+ (show_key_with_all_names, show_basic_key_info): --keyid-format
+ conversion.
+
2004-05-18 David Shaw <[email protected]>
* sign.c (update_keysig_packet): Policies and notations should be
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 9b7638b49..ba5020ed7 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -2109,18 +2109,20 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
}
}
else if( node->pkt->pkttype == PKT_SECRET_KEY
- || (with_subkeys && node->pkt->pkttype == PKT_SECRET_SUBKEY) ) {
+ || (with_subkeys && node->pkt->pkttype == PKT_SECRET_SUBKEY) )
+ {
PKT_secret_key *sk = node->pkt->pkt.secret_key;
- tty_printf(_("%s%c %4u%c/%08lX created: %s expires: %s"),
- node->pkt->pkttype == PKT_SECRET_KEY? "sec":"ssb",
- (node->flag & NODFLG_SELKEY)? '*':' ',
- nbits_from_sk( sk ),
- pubkey_letter( sk->pubkey_algo ),
- (ulong)keyid_from_sk(sk,NULL),
- datestr_from_sk(sk),
- expirestr_from_sk(sk) );
+ tty_printf("%s%c %4u%c/%s ",
+ node->pkt->pkttype == PKT_SECRET_KEY? "sec":"ssb",
+ (node->flag & NODFLG_SELKEY)? '*':' ',
+ nbits_from_sk( sk ),
+ pubkey_letter( sk->pubkey_algo ),
+ keystr_from_sk(sk));
+ tty_printf(_("created: %s"),datestr_from_sk(sk));
+ tty_printf(" ");
+ tty_printf(_("expires: %s"),expirestr_from_sk(sk));
tty_printf("\n");
- }
+ }
else if( with_subkeys && node->pkt->pkttype == PKT_SIGNATURE
&& node->pkt->pkt.signature->sig_class == 0x28 ) {
PKT_signature *sig = node->pkt->pkt.signature;
@@ -2214,14 +2216,14 @@ show_basic_key_info ( KBNODE keyblock )
/* Note, we use the same format string as in other show
functions to make the translation job easier. */
- tty_printf (_("%s%c %4u%c/%08lX created: %s expires: %s"),
+ tty_printf ("%s %4u%c/%s ",
node->pkt->pkttype == PKT_PUBLIC_KEY? "pub":"sub",
- ' ',
nbits_from_pk( pk ),
pubkey_letter( pk->pubkey_algo ),
- (ulong)keyid_from_pk(pk,NULL),
- datestr_from_pk(pk),
- expirestr_from_pk(pk) );
+ keystr_from_pk(pk));
+ tty_printf(_("created: %s"),datestr_from_pk(pk));
+ tty_printf(" ");
+ tty_printf(_("expires: %s"),expirestr_from_pk(pk));
tty_printf("\n");
print_fingerprint ( pk, NULL, 3 );
tty_printf("\n");
@@ -2229,14 +2231,14 @@ show_basic_key_info ( KBNODE keyblock )
else if (node->pkt->pkttype == PKT_SECRET_KEY)
{
PKT_secret_key *sk = node->pkt->pkt.secret_key;
- tty_printf(_("%s%c %4u%c/%08lX created: %s expires: %s"),
+ tty_printf("%s %4u%c/%s",
node->pkt->pkttype == PKT_SECRET_KEY? "sec":"ssb",
- ' ',
nbits_from_sk( sk ),
pubkey_letter( sk->pubkey_algo ),
- (ulong)keyid_from_sk(sk,NULL),
- datestr_from_sk(sk),
- expirestr_from_sk(sk) );
+ keystr_from_sk(sk));
+ tty_printf(_("created: %s"),datestr_from_sk(sk));
+ tty_printf(" ");
+ tty_printf(_("expires: %s"),expirestr_from_sk(sk));
tty_printf("\n");
print_fingerprint (NULL, sk, 3 );
tty_printf("\n");
diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c
index d61bd0125..02a091300 100644
--- a/g10/pubkey-enc.c
+++ b/g10/pubkey-enc.c
@@ -100,8 +100,8 @@ get_session_key( PKT_pubkey_enc *k, DEK *dek )
if( sk->pubkey_algo != k->pubkey_algo )
continue;
keyid_from_sk( sk, keyid );
- log_info(_("anonymous recipient; trying secret key %08lX ...\n"),
- (ulong)keyid[1] );
+ log_info(_("anonymous recipient; trying secret key %s ...\n"),
+ keystr(keyid));
if(!opt.try_all_secrets && !is_status_enabled())
{
@@ -283,8 +283,8 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid )
if (!pk)
BUG ();
if ( pk->expiredate && pk->expiredate <= make_timestamp() ) {
- log_info(_("NOTE: secret key %08lX expired at %s\n"),
- (ulong)keyid[1], asctimestamp( pk->expiredate) );
+ log_info(_("NOTE: secret key %s expired at %s\n"),
+ keystr(keyid), asctimestamp( pk->expiredate) );
}
}