[svn] GnuPG - r4595 - branches/STABLE-BRANCH-1-4/g10

svn author dshaw cvs at cvs.gnupg.org
Wed Oct 17 18:37:20 CEST 2007


Author: dshaw
Date: 2007-10-17 18:37:09 +0200 (Wed, 17 Oct 2007)
New Revision: 4595

Modified:
   branches/STABLE-BRANCH-1-4/g10/ChangeLog
   branches/STABLE-BRANCH-1-4/g10/gpg.c
   branches/STABLE-BRANCH-1-4/g10/keyedit.c
   branches/STABLE-BRANCH-1-4/g10/misc.c
   branches/STABLE-BRANCH-1-4/g10/options.h
Log:
* options.h, gpg.c (main), misc.c (compliance_option_string): Add
--rfc4880, and make --openpgp an alias to it.  --rfc2440 now stands
alone.  For now, use the old 2440 defaults for 4880.

* keyedit.c (keyedit_menu): Use compliance_option_string() instead of
printing the compliance modes here.


Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog	2007-10-17 16:11:09 UTC (rev 4594)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog	2007-10-17 16:37:09 UTC (rev 4595)
@@ -1,3 +1,12 @@
+2007-10-17  David Shaw  <dshaw at jabberwocky.com>
+
+	* options.h, gpg.c (main), misc.c (compliance_option_string): Add
+	--rfc4880, and make --openpgp an alias to it.  --rfc2440 now
+	stands alone.  For now, use the old 2440 defaults for 4880.
+
+	* keyedit.c (keyedit_menu): Use compliance_option_string() instead
+	of printing the compliance modes here.
+
 2007-09-02  David Shaw  <dshaw at jabberwocky.com>
 
 	* import.c (collapse_uids): Significant speedup for de-duping user

Modified: branches/STABLE-BRANCH-1-4/g10/gpg.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/gpg.c	2007-10-17 16:11:09 UTC (rev 4594)
+++ branches/STABLE-BRANCH-1-4/g10/gpg.c	2007-10-17 16:37:09 UTC (rev 4595)
@@ -204,6 +204,7 @@
     oGnuPG,
     oRFC1991,
     oRFC2440,
+    oRFC4880,
     oOpenPGP,
     oPGP2,
     oPGP6,
@@ -532,6 +533,7 @@
     { oGnuPG, "no-pgp8", 0, "@"},
     { oRFC1991, "rfc1991",   0, "@"},
     { oRFC2440, "rfc2440", 0, "@" },
+    { oRFC4880, "rfc4880", 0, "@" },
     { oOpenPGP, "openpgp", 0, N_("use strict OpenPGP behavior")},
     { oPGP2, "pgp2", 0, N_("generate PGP 2.x compatible messages")},
     { oPGP6, "pgp6", 0, "@"},
@@ -2255,11 +2257,32 @@
 	    opt.escape_from = 1;
 	    break;
 	  case oOpenPGP:
+	  case oRFC4880:
+	    /* Note these are the same defaults as CO_RFC2440.  Update
+	       this. */
+	    opt.compliance = CO_RFC4880;
+	    opt.rfc2440_text=1;
+	    opt.allow_non_selfsigned_uid = 1;
+	    opt.allow_freeform_uid = 1;
+	    opt.pgp2_workarounds = 0;
+	    opt.escape_from = 0;
+	    opt.force_v3_sigs = 0;
+	    opt.compress_keys = 0;	    /* not mandated, but we do it */
+	    opt.compress_sigs = 0;	    /* ditto. */
+	    opt.not_dash_escaped = 0;
+	    opt.def_cipher_algo = 0;
+	    opt.def_digest_algo = 0;
+	    opt.cert_digest_algo = 0;
+	    opt.compress_algo = -1;
+            opt.s2k_mode = 3; /* iterated+salted */
+	    opt.s2k_digest_algo = DIGEST_ALGO_SHA1;
+	    opt.s2k_cipher_algo = CIPHER_ALGO_3DES;
+	    break;
 	  case oRFC2440:
 	    /* TODO: When 2440bis becomes a RFC, set new values for
 	       oOpenPGP. */
+	    opt.compliance = CO_RFC2440;
 	    opt.rfc2440_text=1;
-	    opt.compliance = CO_RFC2440;
 	    opt.allow_non_selfsigned_uid = 1;
 	    opt.allow_freeform_uid = 1;
 	    opt.pgp2_workarounds = 0;

Modified: branches/STABLE-BRANCH-1-4/g10/keyedit.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/keyedit.c	2007-10-17 16:11:09 UTC (rev 4594)
+++ branches/STABLE-BRANCH-1-4/g10/keyedit.c	2007-10-17 16:37:09 UTC (rev 4595)
@@ -1,6 +1,6 @@
 /* keyedit.c - keyedit stuff
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- *               2006 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ *               2007 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -1790,7 +1790,7 @@
               {
                 tty_printf(
                    _("This command is not allowed while in %s mode.\n"),
-		   RFC2440?"OpenPGP":PGP2?"PGP2":"RFC-1991");
+		   compliance_option_string());
                 break;
               }
 	    photo=1;

Modified: branches/STABLE-BRANCH-1-4/g10/misc.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/misc.c	2007-10-17 16:11:09 UTC (rev 4594)
+++ branches/STABLE-BRANCH-1-4/g10/misc.c	2007-10-17 16:37:09 UTC (rev 4595)
@@ -801,8 +801,12 @@
 {
   switch(opt.compliance)
     {
+    case CO_RFC4880:
+      return "--openpgp";
     case CO_RFC2440:
-      return "--openpgp";
+      return "--rfc2440";
+    case CO_RFC1991:
+      return "--rfc1991";
     case CO_PGP2:
       return "--pgp2";
     case CO_PGP6:

Modified: branches/STABLE-BRANCH-1-4/g10/options.h
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/options.h	2007-10-17 16:11:09 UTC (rev 4594)
+++ branches/STABLE-BRANCH-1-4/g10/options.h	2007-10-17 16:37:09 UTC (rev 4595)
@@ -1,6 +1,6 @@
 /* options.h
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- *               2006 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ *               2007 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -105,7 +105,8 @@
   int force_ownertrust;
   enum
     {
-      CO_GNUPG=0, CO_RFC2440, CO_RFC1991, CO_PGP2, CO_PGP6, CO_PGP7, CO_PGP8
+      CO_GNUPG, CO_RFC4880, CO_RFC2440, CO_RFC1991, CO_PGP2,
+      CO_PGP6, CO_PGP7, CO_PGP8
     } compliance;
   enum
     {
@@ -272,14 +273,15 @@
 #define DBG_EXTPROG (opt.debug & DBG_EXTPROG_VALUE)
 #define DBG_CARD_IO (opt.debug & DBG_CARD_IO_VALUE)
 
-
 #define GNUPG   (opt.compliance==CO_GNUPG)
 #define RFC1991 (opt.compliance==CO_RFC1991 || opt.compliance==CO_PGP2)
 #define RFC2440 (opt.compliance==CO_RFC2440)
+#define RFC4880 (opt.compliance==CO_RFC4880)
 #define PGP2    (opt.compliance==CO_PGP2)
 #define PGP6    (opt.compliance==CO_PGP6)
 #define PGP7    (opt.compliance==CO_PGP7)
 #define PGP8    (opt.compliance==CO_PGP8)
+#define PGPX    (PGP2 || PGP6 || PGP7 || PGP8)
 
 /* Various option flags.  Note that there should be no common string
    names between the IMPORT_ and EXPORT_ flags as they can be mixed in




More information about the Gnupg-commits mailing list