mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: New option --assert-signer.
* g10/gpg.c (enum cmd_and_opt_values): Add oAssertSigner. (opts): Add "assert-signer". (main): Set option. (assert_signer_true): New var. (g10_exit): Evaluate new var. * g10/main.h (assert_signer_true): Declare new var. * common/status.h (STATUS_ASSERT_SIGNER): New. * g10/options.h (opt): Add field assert_signer_list. * g10/verify.c (is_fingerprint): New. (check_assert_signer_list): New. * g10/mainproc.c (check_sig_and_print): Call that function. Clear assert_signer_true on a warning. * g10/gpgv.c: Add dummy function and vars. * g10/t-keydb-get-keyblock.c: Ditto. * g10/t-keydb.c: Ditto. * g10/t-stutter.c: Ditto. --
This commit is contained in:
parent
42ccbd6c78
commit
c9e95b8dee
13 changed files with 216 additions and 15 deletions
|
@ -2410,7 +2410,7 @@ check_sig_and_print (CTX c, kbnode_t node)
|
|||
}
|
||||
|
||||
/* For good signatures print the VALIDSIG status line. */
|
||||
if (!rc && is_status_enabled () && pk)
|
||||
if (!rc && (is_status_enabled () || opt.assert_signer_list) && pk)
|
||||
{
|
||||
char pkhex[MAX_FINGERPRINT_LEN*2+1];
|
||||
char mainpkhex[MAX_FINGERPRINT_LEN*2+1];
|
||||
|
@ -2430,6 +2430,8 @@ check_sig_and_print (CTX c, kbnode_t node)
|
|||
sig->digest_algo,
|
||||
sig->sig_class,
|
||||
mainpkhex);
|
||||
/* Handle the --assert-signer option. */
|
||||
check_assert_signer_list (mainpkhex, pkhex);
|
||||
}
|
||||
|
||||
/* Print compliance warning for Good signatures. */
|
||||
|
@ -2510,6 +2512,7 @@ check_sig_and_print (CTX c, kbnode_t node)
|
|||
is not a detached signature. */
|
||||
log_info (_("WARNING: not a detached signature; "
|
||||
"file '%s' was NOT verified!\n"), dfile);
|
||||
assert_signer_true = 0;
|
||||
}
|
||||
xfree (dfile);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue