aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-11-15 16:50:03 +0000
committerWerner Koch <[email protected]>2016-11-15 16:50:03 +0000
commitb47603a0ac24902c5bb000f8ef27cfb99aceeb81 (patch)
treeb9676f69fe176a53db7078e8009845ebd42f196c /g10/gpg.c
parentdoc: Add comment to make clear that KBNODE is deprecated. (diff)
downloadgnupg-b47603a0ac24902c5bb000f8ef27cfb99aceeb81.tar.gz
gnupg-b47603a0ac24902c5bb000f8ef27cfb99aceeb81.zip
gpg: Add new compliance mode "de-vs".
* g10/options.h (CO_DE_VS): New. (GNUPG): Also allow CO_DE_VS. * g10/gpg.c (oDE_VS): New. (parse_compliance_option): Add "de-vs". (set_compliance_option): Set "de-vs". * g10/misc.c (compliance_option_string): Return a description string. (compliance_failure): Ditto. * g10/keygen.c (ask_algo): Take care of CO_DE_VS. (get_keysize_range): Ditto. (ask_curve): Add new field to CURVES and trun flags into bit flags. Allow only Brainpool curves in CO_DE_VS mode. -- As of now this compliance mode only restricts the set of algorithms and curves which can be created. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index b5fe490eb..495356c3e 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -233,6 +233,7 @@ enum cmd_and_opt_values
oPGP6,
oPGP7,
oPGP8,
+ oDE_VS,
oRFC2440Text,
oNoRFC2440Text,
oCipherAlgo,
@@ -2042,7 +2043,8 @@ parse_compliance_option (const char *string)
{ "rfc2440", oRFC2440 },
{ "pgp6", oPGP6 },
{ "pgp7", oPGP7 },
- { "pgp8", oPGP8 }
+ { "pgp8", oPGP8 },
+ { "de-vs", oDE_VS }
};
int i;
@@ -2118,6 +2120,13 @@ set_compliance_option (enum cmd_and_opt_values option)
case oPGP7: opt.compliance = CO_PGP7; break;
case oPGP8: opt.compliance = CO_PGP8; break;
case oGnuPG: opt.compliance = CO_GNUPG; break;
+
+ case oDE_VS:
+ set_compliance_option (oOpenPGP);
+ opt.compliance = CO_DE_VS;
+ /* Fixme: Change other options. */
+ break;
+
default:
BUG ();
}