mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg,gpgsm: Add option --min-rsa-length.
* common/compliance.c (min_compliant_rsa_length): New. (gnupg_pk_is_compliant): Take in account. (gnupg_pk_is_allowed): Ditto. (gnupg_set_compliance_extra_info): New. * g10/gpg.c (oMinRSALength): New. (opts): Add --min-rsa-length. (main): Set value. * g10/options.h (opt): Add field min_rsa_length. * sm/gpgsm.c (oMinRSALength): New. (opts): Add --min-rsa-length. (main): Set value. * sm/gpgsm.h (opt): Add field min_rsa_length.
This commit is contained in:
parent
749bb80cb7
commit
5f39db70c0
8 changed files with 57 additions and 10 deletions
|
@ -248,6 +248,7 @@ enum cmd_and_opt_values
|
|||
oPGP7,
|
||||
oPGP8,
|
||||
oDE_VS,
|
||||
oMinRSALength,
|
||||
oRFC2440Text,
|
||||
oNoRFC2440Text,
|
||||
oCipherAlgo,
|
||||
|
@ -629,6 +630,7 @@ static gpgrt_opt_t opts[] = {
|
|||
ARGPARSE_s_n (oPGP7, "pgp7", "@"),
|
||||
ARGPARSE_s_n (oPGP8, "pgp8", "@"),
|
||||
ARGPARSE_s_s (oDefaultNewKeyAlgo, "default-new-key-algo", "@"),
|
||||
ARGPARSE_p_u (oMinRSALength, "min-rsa-length", "@"),
|
||||
#ifndef NO_TRUST_MODELS
|
||||
ARGPARSE_s_n (oAlwaysTrust, "always-trust", "@"),
|
||||
#endif
|
||||
|
@ -3009,6 +3011,8 @@ main (int argc, char **argv)
|
|||
set_compliance_option (pargs.r_opt);
|
||||
break;
|
||||
|
||||
case oMinRSALength: opt.min_rsa_length = pargs.r.ret_ulong; break;
|
||||
|
||||
case oRFC2440Text: opt.rfc2440_text=1; break;
|
||||
case oNoRFC2440Text: opt.rfc2440_text=0; break;
|
||||
|
||||
|
@ -3884,6 +3888,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
set_debug (debug_level);
|
||||
gnupg_set_compliance_extra_info (opt.min_rsa_length);
|
||||
if (DBG_CLOCK)
|
||||
log_clock ("start");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue