[Pkg-gnupg-commit] [gnupg2] 24/160: gpg: New option --rfc4880bis.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Jul 15 09:36:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch upstream
in repository gnupg2.
commit ee2d9061d7abc36b857165a8395203a97380baa2
Author: Werner Koch <wk at gnupg.org>
Date: Mon Jun 20 22:19:23 2016 +0200
gpg: New option --rfc4880bis.
* g10/options.h (struct opt): Add field flags.rfc4880bis.
* g10/gpg.c (oRFC4880bis): new.
(opts): add --rfc4880bis.
(main): Implement that and print a warning.
--
This is option enables experimental features which may be dropped or
changed with the next release.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
doc/gpg.texi | 7 +++++++
g10/gpg.c | 8 ++++++++
g10/options.h | 2 ++
3 files changed, 17 insertions(+)
diff --git a/doc/gpg.texi b/doc/gpg.texi
index 6437b90..3ea298e 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -2464,6 +2464,13 @@ Reset all packet, cipher and digest options to strict RFC-4880
behavior. Note that this is currently the same thing as
@option{--openpgp}.
+ at item --rfc4880bis
+ at opindex rfc4880bis
+Enable experimental features from proposed updates to RFC-4880. This
+option can be used in addition to the other compliance options.
+Warning: The behavior may change with any GnuPG release and created
+keys or data may not be usable with future GnuPG versions.
+
@item --rfc2440
@opindex rfc2440
Reset all packet, cipher and digest options to strict RFC-2440
diff --git a/g10/gpg.c b/g10/gpg.c
index 1f2d416..ef27562 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -216,6 +216,7 @@ enum cmd_and_opt_values
oGnuPG,
oRFC2440,
oRFC4880,
+ oRFC4880bis,
oOpenPGP,
oPGP6,
oPGP7,
@@ -599,6 +600,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oGnuPG, "no-pgp8", "@"),
ARGPARSE_s_n (oRFC2440, "rfc2440", "@"),
ARGPARSE_s_n (oRFC4880, "rfc4880", "@"),
+ ARGPARSE_s_n (oRFC4880bis, "rfc4880bis", "@"),
ARGPARSE_s_n (oOpenPGP, "openpgp", N_("use strict OpenPGP behavior")),
ARGPARSE_s_n (oPGP6, "pgp6", "@"),
ARGPARSE_s_n (oPGP7, "pgp7", "@"),
@@ -2686,6 +2688,9 @@ main (int argc, char **argv)
/* Dummy so that gpg 1.4 conf files can work. Should
eventually be removed. */
break;
+ case oRFC4880bis:
+ opt.flags.rfc4880bis = 1;
+ /* fall thru. */
case oOpenPGP:
case oRFC4880:
/* This is effectively the same as RFC2440, but with
@@ -3399,6 +3404,9 @@ main (int argc, char **argv)
if( may_coredump && !opt.quiet )
log_info(_("WARNING: program may create a core file!\n"));
+ if (opt.flags.rfc4880bis)
+ log_info ("WARNING: using experimental features from RFC4880bis!\n");
+
if (eyes_only) {
if (opt.set_filename)
log_info(_("WARNING: %s overrides %s\n"),
diff --git a/g10/options.h b/g10/options.h
index 0a87b90..e14bc07 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -235,6 +235,8 @@ struct
unsigned int allow_weak_digest_algos:1;
unsigned int large_rsa:1;
unsigned int disable_signer_uid:1;
+ /* Flag to enbale experimental features from RFC4880bis. */
+ unsigned int rfc4880bis:1;
} flags;
/* Linked list of ways to find a key if the key isn't on the local
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list