diff options
author | Werner Koch <[email protected]> | 2012-05-24 08:13:39 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2012-05-24 08:50:14 +0000 |
commit | a4b22d8edf31feb2cd09805a36ec662d8c6e0a09 (patch) | |
tree | 62dcaff8b57a157a504475c63beed16d6ca2e46f | |
parent | common: Remove generated files only during maintainer-clean. (diff) | |
download | gnupg-a4b22d8edf31feb2cd09805a36ec662d8c6e0a09.tar.gz gnupg-a4b22d8edf31feb2cd09805a36ec662d8c6e0a09.zip |
Print the hash algorithm in colon mode key listing.
* g10/keylist.c (list_keyblock_colon): Print digest_algo.
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | doc/DETAILS | 8 | ||||
-rw-r--r-- | g10/keylist.c | 14 |
3 files changed, 13 insertions, 11 deletions
@@ -1,6 +1,8 @@ Noteworthy changes in version 2.0.20 (unreleased) ------------------------------------------------- + * The hash algorithm is now printed for sig records in key listings. + Noteworthy changes in version 2.0.19 (2012-03-27) ------------------------------------------------- diff --git a/doc/DETAILS b/doc/DETAILS index 423eea9d2..e9d2d6fa2 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -3,8 +3,8 @@ Format of colon listings ======================== First an example: -$ gpg --fixed-list-mode --with-colons --list-keys \ - --with-fingerprint --with-fingerprint [email protected] +$ gpg --with-colons --list-keys \ + --with-fingerprint --with-fingerprint [email protected] pub:f:1024:17:6C7EE1B8621CC013:899817715:1055898235::m:::scESC: fpr:::::::::ECAF7590EB3443B5C7CF3ACB6C7EE1B8621CC013: @@ -147,6 +147,10 @@ record; gpg2 does this by default and the option is a dummy. 15. Field Used in sec/sbb to print the serial number of a token (internal protect mode 1002) or a '#' if that key is a simple stub (internal protect mode 1001) +16. Field: For sig records, this is the used hash algorithm: + 2 = SHA-1 + 8 = SHA-256 + (for other id's see include/cipher.h) All dates are displayed in the format yyyy-mm-dd unless you use the option --fixed-list-mode in which case they are displayed as seconds diff --git a/g10/keylist.c b/g10/keylist.c index 8201260d0..4c1624cb6 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -1382,23 +1382,19 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr ) print_string( stdout, p, n, ':' ); xfree(p); } - printf (":%02x%c:", sig->sig_class,sig->flags.exportable?'x':'l'); - + printf (":%02x%c::", sig->sig_class,sig->flags.exportable?'x':'l'); + if (opt.no_sig_cache && opt.check_sigs && fprokay) { - putchar (':'); - for (i=0; i < fplen ; i++ ) printf ("%02X", fparray[i] ); - - putchar (':'); } - printf ("\n"); - + printf (":::%d:\n", sig->digest_algo); + if (opt.show_subpackets) print_subpackets_colon (sig); - + /* fixme: check or list other sigs here */ } } |