diff options
author | David Shaw <[email protected]> | 2003-04-27 20:22:09 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-04-27 20:22:09 +0000 |
commit | 9f6fa94486134b211a37c62bbe115587dd689b67 (patch) | |
tree | c52a326280297baba57ca3a2c03d0a8d40103d23 /g10/mainproc.c | |
parent | * sign.c (do_sign): Show the hash used when making a signature in verbose (diff) | |
download | gnupg-9f6fa94486134b211a37c62bbe115587dd689b67.tar.gz gnupg-9f6fa94486134b211a37c62bbe115587dd689b67.zip |
* g10.c (main): Add --no-textmode.
* export.c (do_export_stream), keyedit.c (show_key_with_all_names,
menu_addrevoker), mainproc.c (check_sig_and_print), photoid.c
(show_photos), sign.c (mk_notation_and_policy), trustdb.c (get_validity,
reset_trust_records, validate_keys): Make some strings translatable.
* mainproc.c (check_sig_and_print): Show digest algorithm and sig class
when verifying a sig with --verbose on, and add version, pk and hash
algorithms and sig class to VALIDSIG.
* parse-packet.c (enum_sig_subpkt): Make a warning message a --verbose
warning message since we don't need to warn every time we see an unknown
critical (we only need to invalidate the signature).
* trustdb.c (init_trustdb): Check the trustdb options even with TM_AUTO
since the auto may become TM_CLASSIC or TM_OPENPGP.
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r-- | g10/mainproc.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c index 1911d0076..d2acdeadf 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -1452,7 +1452,7 @@ check_sig_and_print( CTX c, KBNODE node ) if( !get_pubkey( pk, sig->keyid ) ) { byte array[MAX_FINGERPRINT_LEN], *p; - char buf[MAX_FINGERPRINT_LEN*4+73], *bufp; + char buf[MAX_FINGERPRINT_LEN*4+90], *bufp; size_t i, n; bufp = buf; @@ -1460,10 +1460,15 @@ check_sig_and_print( CTX c, KBNODE node ) p = array; for(i=0; i < n ; i++, p++, bufp += 2) sprintf(bufp, "%02X", *p ); - sprintf(bufp, " %s %lu %lu ", + /* TODO: Replace the reserved '0' in the field below + with bits for status flags (policy url, notation, + etc.). Remember to make the buffer larger to + match! */ + sprintf(bufp, " %s %lu %lu %d 0 %d %d %02X ", strtimestamp( sig->timestamp ), - (ulong)sig->timestamp, - (ulong)sig->expiredate ); + (ulong)sig->timestamp,(ulong)sig->expiredate, + sig->version,sig->pubkey_algo,sig->digest_algo, + sig->sig_class); bufp = bufp + strlen (bufp); if (!pk->is_primary) { u32 akid[2]; @@ -1493,11 +1498,18 @@ check_sig_and_print( CTX c, KBNODE node ) if(sig->flags.expired) { - log_info("Signature expired %s\n",asctimestamp(sig->expiredate)); + log_info(_("Signature expired %s\n"), + asctimestamp(sig->expiredate)); rc=G10ERR_GENERAL; /* need a better error here? */ } else if(sig->expiredate) - log_info("Signature expires %s\n",asctimestamp(sig->expiredate)); + log_info(_("Signature expires %s\n"),asctimestamp(sig->expiredate)); + + if(opt.verbose) + log_info(_("%s signature, digest algorithm %s\n"), + sig->sig_class==0x00?_("binary"): + sig->sig_class==0x01?_("textmode"):_("unknown"), + digest_algo_to_string(sig->digest_algo)); if( rc ) g10_errors_seen = 1; |