GNUPG-1-9-BRANCH gnupg (ChangeLog NEWS configure.ac sm/ChangeLog sm/gpgsm.c)

cvs user wk cvs at cvs.gnupg.org
Wed Dec 22 18:50:23 CET 2004


    Date: Wednesday, December 22, 2004 @ 18:55:28
  Author: wk
    Path: /cvs/gnupg/gnupg
     Tag: GNUPG-1-9-BRANCH

Modified: ChangeLog NEWS configure.ac sm/ChangeLog sm/gpgsm.c

(set_binary): New.
(main, open_read, open_fwrite): Use it.


--------------+
 ChangeLog    |    4 ++++
 NEWS         |    6 ++++--
 configure.ac |    4 ++--
 sm/ChangeLog |    5 +++++
 sm/gpgsm.c   |   40 ++++++++++++++++++++++++++++++++++++----
 5 files changed, 51 insertions(+), 8 deletions(-)


Index: gnupg/ChangeLog
diff -u gnupg/ChangeLog:1.131.2.63 gnupg/ChangeLog:1.131.2.64
--- gnupg/ChangeLog:1.131.2.63	Mon Dec 20 17:17:25 2004
+++ gnupg/ChangeLog	Wed Dec 22 18:55:28 2004
@@ -1,3 +1,7 @@
+2004-12-22  Werner Koch  <wk at g10code.com>
+
+	Released 1.9.14.
+
 2004-12-20  Werner Koch  <wk at g10code.com>
 
 	* configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let all
Index: gnupg/NEWS
diff -u gnupg/NEWS:1.165.2.61 gnupg/NEWS:1.165.2.62
--- gnupg/NEWS:1.165.2.61	Mon Dec 20 17:17:25 2004
+++ gnupg/NEWS	Wed Dec 22 18:55:28 2004
@@ -1,11 +1,13 @@
-Noteworthy changes in version 1.9.14
+Noteworthy changes in version 1.9.14 (2004-12-22)
 -------------------------------------------------
 
  * [gpg-agent] New option --use-standard-socket to allow the use of a
    fixed socket.  gpgsm falls back to this socket if GPG_AGENT_INFO
    has not been set.
 
- * Ported to MS Windows.
+ * Ported to MS Windows with some functional limitations.
+
+ * New tool gpg-preset-passphrase.
 
 
 Noteworthy changes in version 1.9.13 (2004-12-03)
Index: gnupg/configure.ac
diff -u gnupg/configure.ac:1.36.2.75 gnupg/configure.ac:1.36.2.76
--- gnupg/configure.ac:1.36.2.75	Mon Dec 20 17:17:24 2004
+++ gnupg/configure.ac	Wed Dec 22 18:55:28 2004
@@ -20,11 +20,11 @@
 
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
-min_automake_version="1.7.9"
+min_automake_version="1.9.3"
 
 # Version number: Remember to change it immediately *after* a release.
 #                 Add a "-cvs" prefix for non-released code.
-AC_INIT(gnupg, 1.9.14-cvs, gnupg-devel at gnupg.org)
+AC_INIT(gnupg, 1.9.14, gnupg-devel at gnupg.org)
 # Set development_version to yes if the minor number is odd or you
 # feel that the default check for a development version is not
 # sufficient.
Index: gnupg/sm/ChangeLog
diff -u gnupg/sm/ChangeLog:1.101.2.86 gnupg/sm/ChangeLog:1.101.2.87
--- gnupg/sm/ChangeLog:1.101.2.86	Tue Dec 21 20:05:14 2004
+++ gnupg/sm/ChangeLog	Wed Dec 22 18:55:28 2004
@@ -1,3 +1,8 @@
+2004-12-22  Werner Koch  <wk at g10code.com>
+
+	* gpgsm.c (set_binary): New.
+	(main, open_read, open_fwrite): Use it.
+
 2004-12-21  Werner Koch  <wk at g10code.com>
 
 	* gpgsm.c (main): Use default_homedir().
Index: gnupg/sm/gpgsm.c
diff -u gnupg/sm/gpgsm.c:1.67.2.37 gnupg/sm/gpgsm.c:1.67.2.38
--- gnupg/sm/gpgsm.c:1.67.2.37	Tue Dec 21 20:05:14 2004
+++ gnupg/sm/gpgsm.c	Wed Dec 22 18:55:28 2004
@@ -39,6 +39,11 @@
 #include "keydb.h"
 #include "sysutils.h"
 
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
 enum cmd_and_opt_values {
   aNull = 0,
   oArmor        = 'a',
@@ -562,6 +567,17 @@
 }
 
 
+/* Set the file pointer into binary mode if required.  */
+static void
+set_binary (FILE *fp)
+{
+#ifdef HAVE_DOSISH_SYSTEM
+  setmode (fileno (fp), O_BINARY);
+#endif
+}
+
+
+
 static void
 i18n_init(void)
 {
@@ -758,7 +774,7 @@
 
   opt.homedir = default_homedir ();
 #ifdef HAVE_W32_SYSTEM
-  opt.no_crl_checks = 1;
+  opt.no_crl_check = 1;
 #endif
 
   /* First check whether we have a config file on the commandline */
@@ -1374,6 +1390,8 @@
       break;
 
     case aEncr: /* encrypt the given file */
+      set_binary (stdin);
+      set_binary (stdout);
       if (!argc)
         gpgsm_encrypt (&ctrl, recplist, 0, stdout); /* from stdin */
       else if (argc == 1)
@@ -1386,6 +1404,8 @@
       /* FIXME: We don't handle --output yet. We should also allow
          to concatenate multiple files for signing because that is
          what gpg does.*/
+      set_binary (stdin);
+      set_binary (stdout);
       if (!argc)
         gpgsm_sign (&ctrl, signerlist,
                     0, detached_sig, stdout); /* create from stdin */
@@ -1408,6 +1428,7 @@
       {
         FILE *fp = NULL;
 
+        set_binary (stdin);
         if (argc == 2 && opt.outfile)
           log_info ("option --output ignored for a detached signature\n");
         else if (opt.outfile)
@@ -1432,6 +1453,8 @@
       break;
 
     case aDecrypt:
+      set_binary (stdin);
+      set_binary (stdout);
       if (!argc)
         gpgsm_decrypt (&ctrl, 0, stdout); /* from stdin */
       else if (argc == 1)
@@ -1502,6 +1525,7 @@
       break;
 
     case aExport:
+      set_binary (stdout);
       for (sl=NULL; argc; argc--, argv++)
         add_to_strlist (&sl, *argv);
       gpgsm_export (&ctrl, sl, stdout);
@@ -1509,6 +1533,7 @@
       break;
 
     case aExportSecretKeyP12:
+      set_binary (stdout);
       if (argc == 1)
         gpgsm_p12_export (&ctrl, *argv, stdout);
       else
@@ -1644,11 +1669,14 @@
   int fd;
 
   if (filename[0] == '-' && !filename[1])
-    return 0; /* stdin */
+    {
+      set_binary (stdin);
+      return 0; /* stdin */
+    }
   fd = check_special_filename (filename);
   if (fd != -1)
     return fd;
-  fd = open (filename, O_RDONLY);
+  fd = open (filename, O_RDONLY | O_BINARY);
   if (fd == -1)
     {
       log_error (_("can't open `%s': %s\n"), filename, strerror (errno));
@@ -1668,7 +1696,10 @@
   FILE *fp;
 
   if (filename[0] == '-' && !filename[1])
-    return stdout;
+    {
+      set_binary (stdout);
+      return stdout;
+    }
 
   fd = check_special_filename (filename);
   if (fd != -1)
@@ -1679,6 +1710,7 @@
           log_error ("fdopen(%d) failed: %s\n", fd, strerror (errno));
           gpgsm_exit (2);
         }
+      set_binary (fp);
       return fp;
     }
   fp = fopen (filename, "wb");




More information about the Gnupg-commits mailing list