aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-11-07 09:36:17 +0000
committerWerner Koch <[email protected]>2019-11-07 09:36:17 +0000
commite624c41dbafd33af82c1153188d14de72fcc7cd8 (patch)
tree2c0af29b948eeebbdc3667d7859f4f01417c03fb /g10/gpg.c
parentgpg: Print rfc4880bis note only in verbose mode. (diff)
downloadgnupg-e624c41dbafd33af82c1153188d14de72fcc7cd8.tar.gz
gnupg-e624c41dbafd33af82c1153188d14de72fcc7cd8.zip
gpg: Add option --allow-weak-key-signatures.
* g10/gpg.c (oAllowWeakKeySignatures): New. (opts): Add --allow-weak-key-signatures. (main): Set it. * g10/options.h (struct opt): Add flags.allow_weak_key_signatures. * g10/misc.c (print_sha1_keysig_rejected_note): New. * g10/sig-check.c (check_signature_over_key_or_uid): Print note and act on new option. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 332b46e39..2eb4fd51d 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -414,6 +414,7 @@ enum cmd_and_opt_values
oEnableDSA2,
oDisableDSA2,
oAllowWeakDigestAlgos,
+ oAllowWeakKeySignatures,
oFakedSystemTime,
oNoAutostart,
oPrintPKARecords,
@@ -902,6 +903,9 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oNoSymkeyCache, "no-symkey-cache", "@"),
ARGPARSE_s_n (oUseKeyboxd, "use-keyboxd", "@"),
+ /* Options to override new security defaults. */
+ ARGPARSE_s_n (oAllowWeakKeySignatures, "allow-weak-key-signatures", "@"),
+
/* Options which can be used in special circumstances. They are not
* published and we hope they are never required. */
ARGPARSE_s_n (oUseOnlyOpenPGPCard, "use-only-openpgp-card", "@"),
@@ -3639,6 +3643,10 @@ main (int argc, char **argv)
opt.flags.allow_weak_digest_algos = 1;
break;
+ case oAllowWeakKeySignatures:
+ opt.flags.allow_weak_key_signatures = 1;
+ break;
+
case oFakedSystemTime:
{
size_t len = strlen (pargs.r.ret_str);