1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: New option --require-pqc-encryption

* g10/gpg.c (oRequirePQCEncryption): New.
(opts): Add option.
(main): Set option.
* g10/mainproc.c (print_pkenc_list): Print a warning.
* g10/options.h (flags): Add flag require_pqc_encryption.
* g10/getkey.c (finish_lookup): Skip non-pqc keys if the option is
set.
--

GnuPG-bug-id: 6815
This commit is contained in:
Werner Koch 2024-04-24 09:56:30 +02:00
parent a45243548e
commit 2958e5e4cf
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 36 additions and 1 deletions

View file

@ -456,6 +456,7 @@ enum cmd_and_opt_values
oAssertSigner,
oAssertPubkeyAlgo,
oKbxBufferSize,
oRequirePQCEncryption,
oNoop
};
@ -896,7 +897,7 @@ static gpgrt_opt_t opts[] = {
ARGPARSE_s_s (oCipherAlgo, "cipher-algo", "@"),
ARGPARSE_s_s (oDigestAlgo, "digest-algo", "@"),
ARGPARSE_s_s (oCertDigestAlgo, "cert-digest-algo", "@"),
ARGPARSE_s_n (oRequirePQCEncryption, "require-pqc-encryption", "@"),
ARGPARSE_header (NULL, N_("Options for unattended use")),
@ -3071,6 +3072,9 @@ main (int argc, char **argv)
break;
case oMinRSALength: opt.min_rsa_length = pargs.r.ret_ulong; break;
case oRequirePQCEncryption:
opt.flags.require_pqc_encryption = 1;
break;
case oRFC2440Text: opt.rfc2440_text=1; break;
case oNoRFC2440Text: opt.rfc2440_text=0; break;