[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.2.1-28-gb543e4d

by Andre Heinecke cvs at cvs.gnupg.org
Tue Aug 12 21:32:40 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG for Windows".

The branch, master has been updated
       via  b543e4db014be41e9f8ab4950263da3a383b2ff4 (commit)
      from  6e5bb91711fbeefea8aac086e3bb5f58e58b04db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b543e4db014be41e9f8ab4950263da3a383b2ff4
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Aug 12 21:30:41 2014 +0200

    Enable wildcard support for gnupg
    
        * patches/gnupg2-2.0.20/02-allow-mark-trusted.patch,
        patches/gnupg2-2.0.21/01-scd-varlen.patch,
        patches/gnupg2-2.0.21/02-scd-spr532.patch: Remove obsolete patches.
        * patches/0001-Enable-wildcard-expansion-with-mingw-w64.patch: New.
    
        NEWS: Mention this.
    
    --
        This works at least with the mingw-crt from ubuntu 14.4

diff --git a/NEWS b/NEWS
index ede38c9..b876b78 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,11 @@ Noteworthy changes in version 2.2.2 (unreleased)
 (de) Bestätigungs und Warnmeldungen von pinentry-qt sollten sich nun auch
      im Vordergrund öffnen.
 
+(en) Command line wildcards (like *.txt) now work again.
+
+(de) Platzhalter (wie *.txt) in Kommandozeilenaufrufen funktionieren nun
+     wieder.
+
 ~~~~~~~~~~~~~~~
 GnuPG:          2.0.26
 Kleopatra:      2.2.0-gitac229d2
diff --git a/patches/gnupg2-2.0.20/02-allow-mark-trusted.patch b/patches/gnupg2-2.0.20/02-allow-mark-trusted.patch
deleted file mode 100755
index e51028b..0000000
--- a/patches/gnupg2-2.0.20/02-allow-mark-trusted.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-#! /bin/sh
-patch -p1 -f $* < $0
-exit $?
-
-Make option allow-mark-trusted the default
-Also add new option no-allow-mark-trusted.
-Always set the relax flag when changing an trustlist item.
-
-diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
-index 7671a51..eacb1c9 100644
---- a/agent/gpg-agent.c
-+++ b/agent/gpg-agent.c
-@@ -101,6 +101,7 @@ enum cmd_and_opt_values
-
-   oIgnoreCacheForSigning,
-   oAllowMarkTrusted,
-+  oNoAllowMarkTrusted,
-   oAllowPresetPassphrase,
-   oKeepTTY,
-   oKeepDISPLAY,
-@@ -172,8 +173,9 @@ static ARGPARSE_OPTS opts[] = {
-
-   { oIgnoreCacheForSigning, "ignore-cache-for-signing", 0,
-                                N_("do not use the PIN cache when signing")},
--  { oAllowMarkTrusted, "allow-mark-trusted", 0,
--                             N_("allow clients to mark keys as \"trusted\"")},
-+  { oNoAllowMarkTrusted, "no-allow-mark-trusted", 0,
-+                            N_("disallow clients to mark keys as \"trusted\"")},
-+  { oAllowMarkTrusted, "allow-mark-trusted", 0, "@"},
-   { oAllowPresetPassphrase, "allow-preset-passphrase", 0,
-                              N_("allow presetting passphrase")},
-   { oSSHSupport, "enable-ssh-support", 0, N_("enable ssh-agent emulation") },
-@@ -472,7 +474,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
-       opt.max_passphrase_days = MAX_PASSPHRASE_DAYS;
-       opt.enable_passhrase_history = 0;
-       opt.ignore_cache_for_signing = 0;
--      opt.allow_mark_trusted = 0;
-+      opt.allow_mark_trusted = 1;
-       opt.disable_scdaemon = 0;
-       return 1;
-     }
-@@ -532,6 +534,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
-     case oIgnoreCacheForSigning: opt.ignore_cache_for_signing = 1; break;
-
-     case oAllowMarkTrusted: opt.allow_mark_trusted = 1; break;
-+    case oNoAllowMarkTrusted: opt.allow_mark_trusted = 0; break;
-
-     case oAllowPresetPassphrase: opt.allow_preset_passphrase = 1; break;
-
-@@ -921,7 +924,7 @@ main (int argc, char **argv )
-               GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME);
-       printf ("ignore-cache-for-signing:%lu:\n",
-               GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME);
--      printf ("allow-mark-trusted:%lu:\n",
-+      printf ("no-allow-mark-trusted:%lu:\n",
-               GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME);
-       printf ("disable-scdaemon:%lu:\n",
-               GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME);
-diff --git a/agent/trustlist.c b/agent/trustlist.c
-index be5406b..ef9c661 100644
---- a/agent/trustlist.c
-+++ b/agent/trustlist.c
-@@ -731,7 +731,8 @@ agent_marktrusted (ctrl_t ctrl, const char *name, const char *fpr, int flag)
-     }
-   else
-     es_fputs (nameformatted, fp);
--  es_fprintf (fp, "\n%s%s %c\n", yes_i_trust?"":"!", fprformatted, flag);
-+  es_fprintf (fp, "\n%s%s %c%s\n", yes_i_trust?"":"!", fprformatted, flag,
-+              flag == 'S'? " relax":"");
-   if (es_ferror (fp))
-     err = gpg_error_from_syserror ();
-
-diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
-index 1b0e446..207c8b8 100644
---- a/tools/gpgconf-comp.c
-+++ b/tools/gpgconf-comp.c
-@@ -526,8 +526,8 @@ static gc_option_t gc_options_gpg_agent[] =
-    { "ignore-cache-for-signing", GC_OPT_FLAG_RUNTIME,
-      GC_LEVEL_BASIC, "gnupg", "do not use the PIN cache when signing",
-      GC_ARG_TYPE_NONE, GC_BACKEND_GPG_AGENT },
--   { "allow-mark-trusted", GC_OPT_FLAG_RUNTIME,
--     GC_LEVEL_ADVANCED, "gnupg", "allow clients to mark keys as \"trusted\"",
-+   { "no-allow-mark-trusted", GC_OPT_FLAG_RUNTIME,
-+     GC_LEVEL_ADVANCED, "gnupg", "disallow clients to mark keys as \"trusted\"",
-      GC_ARG_TYPE_NONE, GC_BACKEND_GPG_AGENT },
-    { "no-grab", GC_OPT_FLAG_RUNTIME, GC_LEVEL_EXPERT,
-      "gnupg", "do not grab keyboard and mouse",
-
-diff --git a/po/de.po b/po/de.po
---- a/po/de.po
-+++ b/po/de.po
-@@ -445,8 +445,8 @@
- msgstr "benutze PINs im Cache nicht beim Signieren"
-
- #: agent/gpg-agent.c:177
--msgid "allow clients to mark keys as \"trusted\""
--msgstr "erlaube Aufrufern Schlüssel als \"vertrauenswürdig\" zu markieren"
-+msgid "disallow clients to mark keys as \"trusted\""
-+msgstr "verbiete Aufrufern Schlüssel als \"vertrauenswürdig\" zu markieren"
-
- #: agent/gpg-agent.c:178
- msgid "allow presetting passphrase"
diff --git a/patches/gnupg2-2.0.21/01-scd-varlen.patch b/patches/gnupg2-2.0.21/01-scd-varlen.patch
deleted file mode 100755
index bc4b772..0000000
--- a/patches/gnupg2-2.0.21/01-scd-varlen.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 43e85d7bee4644ca84ef0ab0c3b08b2d02e4a699 Mon Sep 17 00:00:00 2001
-From: Werner Koch <wk at gnupg.org>
-Date: Wed, 21 Aug 2013 15:44:52 +0200
-Subject: [PATCH 1/2] scd: Improve --enable-pinpad-varlen.
-
-* tools/gpgconf-comp.c (gc_options_scdaemon): Add
-enable-pinpad-varlen.
-* scd/apdu.c (check_pcsc_pinpad): Detect SPRx32 reader.
-
-Signed-off-by: Werner Koch <wk at gnupg.org>
-(cherry picked from commit 7bde2bf3b0ddb5d3515a44879e1a7ddb581a5c0b)
----
- doc/scdaemon.texi    |    8 ++++----
- scd/apdu.c           |    8 +++++++-
- tools/gpgconf-comp.c |    4 ++++
- 3 files changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/doc/scdaemon.texi b/doc/scdaemon.texi
-index ed2cc51..f454f14 100644
---- a/doc/scdaemon.texi
-+++ b/doc/scdaemon.texi
-@@ -290,10 +290,10 @@ than 0.
- @item --enable-pinpad-varlen
- @opindex enable-pinpad-varlen
- Please specify this option when the card reader supports variable
--length input for pinpad (default is no).  For known readers listed in
--ccid-driver, this option is not needed.  Note that if your card reader
--doesn't supports variable length input but you want to use it, you
--need to specify your pinpad request on your card.
-+length input for pinpad (default is no).  For known readers (listed in
-+ccid-driver.c and apdu.c), this option is not needed.  Note that if
-+your card reader doesn't supports variable length input but you want
-+to use it, you need to specify your pinpad request on your card.
-
-
- @item --disable-pinpad
-diff --git a/scd/apdu.c b/scd/apdu.c
-index 372932a..4b3509e 100644
---- a/scd/apdu.c
-+++ b/scd/apdu.c
-@@ -2032,7 +2032,13 @@ check_pcsc_pinpad (int slot, int command, pininfo_t *pininfo)
-   pcsc_dword_t len = 256;
-   int sw;
-
--  (void)pininfo;      /* XXX: Identify reader and set pininfo->fixedlen.  */
-+  /* Hack to identify the SCM SPR532 and SPR332 readers which support
-+     variable length PIN input.
-+     FIXME: Figure out whether there is a feature attribute for this.
-+     Alternatively use the USB ids to detect known readers.  */
-+  if (reader_table[slot].rdrname
-+      && strstr (reader_table[slot].rdrname, "SPRx32"))
-+    pininfo->fixedlen = 0;
-
-  check_again:
-   if (command == ISO7816_VERIFY)
-diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
-index 078dcea..c43e87a 100644
---- a/tools/gpgconf-comp.c
-+++ b/tools/gpgconf-comp.c
-@@ -612,6 +612,10 @@ static gc_option_t gc_options_scdaemon[] =
-    { "disable-pinpad", GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
-      "gnupg", "do not use a reader's pinpad",
-      GC_ARG_TYPE_NONE, GC_BACKEND_SCDAEMON },
-+   { "enable-pinpad-varlen",
-+     GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
-+     "gnupg", "use variable length input for pinpad",
-+     GC_ARG_TYPE_NONE, GC_BACKEND_SCDAEMON },
-    { "card-timeout", GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
-      "gnupg", "|N|disconnect the card after N seconds of inactivity",
-      GC_ARG_TYPE_UINT32, GC_BACKEND_SCDAEMON },
---
-1.7.7.1
diff --git a/patches/gnupg2-2.0.21/02-scd-spr532.patch b/patches/gnupg2-2.0.21/02-scd-spr532.patch
deleted file mode 100755
index 9a71168..0000000
--- a/patches/gnupg2-2.0.21/02-scd-spr532.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From b63717031d8ee3f9ded44a182516158f8a349bd1 Mon Sep 17 00:00:00 2001
-From: Werner Koch <wk at gnupg.org>
-Date: Wed, 21 Aug 2013 16:45:48 +0200
-Subject: [PATCH 2/2] scd: Make SPRx32 pinpad work with PC/SC on Windows.
-
-* scd/apdu.c (CM_IOCTL_GET_FEATURE_REQUEST): Use SCARD_CTL_CODE.
-(SCARD_CTL_CODE): Define if not defined.
-(reader_table_s): Add is_spr532.
-(new_reader_slot): Clear it.
-(check_pcsc_pinpad): Set it.
-(pcsc_pinpad_verify, pcsc_pinpad_modify): Add fix for SPR532.
-
-Signed-off-by: Werner Koch <wk at gnupg.org>
-(cherry picked from commit 5c5e52df4b92e23045ac87abac09357de58920d4)
----
- scd/apdu.c |   34 +++++++++++++++++++++++++++-------
- 1 files changed, 27 insertions(+), 7 deletions(-)
-
-diff --git a/scd/apdu.c b/scd/apdu.c
-index 4b3509e..ecb3e82 100644
---- a/scd/apdu.c
-+++ b/scd/apdu.c
-@@ -133,6 +133,7 @@ struct reader_table_s {
-   int last_status;
-   int status;
-   int is_t0;         /* True if we know that we are running T=0. */
-+  int is_spr532;     /* True if we know that the reader is a SPR532.  */
-   unsigned char atr[33];
-   size_t atrlen;           /* A zero length indicates that the ATR has
-                               not yet been read; i.e. the card is not
-@@ -219,7 +220,12 @@ static char (* DLSTDCALL CT_close) (unsigned short ctn);
- #define PCSC_E_NO_SERVICE              0x8010001D
- #define PCSC_W_REMOVED_CARD            0x80100069
-
--#define CM_IOCTL_GET_FEATURE_REQUEST (0x42000000 + 3400)
-+/* Fix pcsc-lite ABI incompatibilty.  */
-+#ifndef SCARD_CTL_CODE
-+# define SCARD_CTL_CODE(code) (0x42000000 + (code))
-+#endif
-+
-+#define CM_IOCTL_GET_FEATURE_REQUEST     SCARD_CTL_CODE(3400)
- #define FEATURE_VERIFY_PIN_DIRECT        0x06
- #define FEATURE_MODIFY_PIN_DIRECT        0x07
-
-@@ -417,6 +423,7 @@ new_reader_slot (void)
-   reader_table[reader].any_status = 0;
-   reader_table[reader].last_status = 0;
-   reader_table[reader].is_t0 = 1;
-+  reader_table[reader].is_spr532 = 0;
- #ifdef NEED_PCSC_WRAPPER
-   reader_table[reader].pcsc.req_fd = -1;
-   reader_table[reader].pcsc.rsp_fd = -1;
-@@ -2038,7 +2045,10 @@ check_pcsc_pinpad (int slot, int command, pininfo_t *pininfo)
-      Alternatively use the USB ids to detect known readers.  */
-   if (reader_table[slot].rdrname
-       && strstr (reader_table[slot].rdrname, "SPRx32"))
--    pininfo->fixedlen = 0;
-+    {
-+      reader_table[slot].is_spr532 = 1;
-+      pininfo->fixedlen = 0;
-+    }
-
-  check_again:
-   if (command == ISO7816_VERIFY)
-@@ -2097,6 +2107,7 @@ pcsc_pinpad_verify (int slot, int class, int ins, int p0, int p1,
-   int len = PIN_VERIFY_STRUCTURE_SIZE + pininfo->fixedlen;
-   unsigned char result[2];
-   pcsc_dword_t resultlen = 2;
-+  int no_lc;
-
-   if (!reader_table[slot].atrlen
-       && (sw = reset_pcsc_reader (slot)))
-@@ -2120,6 +2131,8 @@ pcsc_pinpad_verify (int slot, int class, int ins, int p0, int p1,
-   if (!pin_verify)
-     return SW_HOST_OUT_OF_CORE;
-
-+  no_lc = (!pininfo->fixedlen && reader_table[slot].is_spr532);
-+
-   pin_verify[0] = 0x00; /* bTimerOut */
-   pin_verify[1] = 0x00; /* bTimerOut2 */
-   pin_verify[2] = 0x82; /* bmFormatString: Byte, pos=0, left, ASCII. */
-@@ -2136,8 +2149,8 @@ pcsc_pinpad_verify (int slot, int class, int ins, int p0, int p1,
-   pin_verify[11] = 0x00; /* bMsgIndex */
-   pin_verify[12] = 0x00; /* bTeoPrologue[0] */
-   pin_verify[13] = 0x00; /* bTeoPrologue[1] */
--  pin_verify[14] = pininfo->fixedlen + 0x05; /* bTeoPrologue[2] */
--  pin_verify[15] = pininfo->fixedlen + 0x05; /* ulDataLength */
-+  pin_verify[14] = pininfo->fixedlen + 0x05 - no_lc; /* bTeoPrologue[2] */
-+  pin_verify[15] = pininfo->fixedlen + 0x05 - no_lc; /* ulDataLength */
-   pin_verify[16] = 0x00; /* ulDataLength */
-   pin_verify[17] = 0x00; /* ulDataLength */
-   pin_verify[18] = 0x00; /* ulDataLength */
-@@ -2148,6 +2161,8 @@ pcsc_pinpad_verify (int slot, int class, int ins, int p0, int p1,
-   pin_verify[23] = pininfo->fixedlen; /* abData[4] */
-   if (pininfo->fixedlen)
-     memset (&pin_verify[24], 0xff, pininfo->fixedlen);
-+  else if (no_lc)
-+    len--;
-
-   if (DBG_CARD_IO)
-     log_debug ("send secure: c=%02X i=%02X p1=%02X p2=%02X len=%d pinmax=%d\n",
-@@ -2178,6 +2193,7 @@ pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
-   int len = PIN_MODIFY_STRUCTURE_SIZE + 2 * pininfo->fixedlen;
-   unsigned char result[2];
-   pcsc_dword_t resultlen = 2;
-+  int no_lc;
-
-   if (!reader_table[slot].atrlen
-       && (sw = reset_pcsc_reader (slot)))
-@@ -2201,6 +2217,8 @@ pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
-   if (!pin_modify)
-     return SW_HOST_OUT_OF_CORE;
-
-+  no_lc = (!pininfo->fixedlen && reader_table[slot].is_spr532);
-+
-   pin_modify[0] = 0x00; /* bTimerOut */
-   pin_modify[1] = 0x00; /* bTimerOut2 */
-   pin_modify[2] = 0x82; /* bmFormatString: Byte, pos=0, left, ASCII. */
-@@ -2221,15 +2239,15 @@ pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
-   if (pininfo->minlen && pininfo->maxlen && pininfo->minlen == pininfo->maxlen)
-     pin_modify[10] |= 0x01; /* Max size reached.  */
-   pin_modify[11] = 0xff; /* bNumberMessage: Default */
--  pin_modify[12] =  0x09; /* wLangId: 0x0409: US English */
-+  pin_modify[12] = 0x09; /* wLangId: 0x0409: US English */
-   pin_modify[13] = 0x04; /* wLangId: 0x0409: US English */
-   pin_modify[14] = 0x00; /* bMsgIndex1 */
-   pin_modify[15] = 0x00; /* bMsgIndex2 */
-   pin_modify[16] = 0x00; /* bMsgIndex3 */
-   pin_modify[17] = 0x00; /* bTeoPrologue[0] */
-   pin_modify[18] = 0x00; /* bTeoPrologue[1] */
--  pin_modify[19] = 2 * pininfo->fixedlen + 0x05; /* bTeoPrologue[2] */
--  pin_modify[20] = 2 * pininfo->fixedlen + 0x05; /* ulDataLength */
-+  pin_modify[19] = 2 * pininfo->fixedlen + 0x05 - no_lc; /* bTeoPrologue[2] */
-+  pin_modify[20] = 2 * pininfo->fixedlen + 0x05 - no_lc; /* ulDataLength */
-   pin_modify[21] = 0x00; /* ulDataLength */
-   pin_modify[22] = 0x00; /* ulDataLength */
-   pin_modify[23] = 0x00; /* ulDataLength */
-@@ -2240,6 +2258,8 @@ pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
-   pin_modify[28] = 2 * pininfo->fixedlen; /* abData[4] */
-   if (pininfo->fixedlen)
-     memset (&pin_modify[29], 0xff, 2 * pininfo->fixedlen);
-+  else if (no_lc)
-+    len--;
-
-   if (DBG_CARD_IO)
-     log_debug ("send secure: c=%02X i=%02X p1=%02X p2=%02X len=%d pinmax=%d\n",
---
-1.7.7.1
diff --git a/patches/gnupg2-2.0.26/0001-Enable-wildcard-expansion-with-mingw-w64.patch b/patches/gnupg2-2.0.26/0001-Enable-wildcard-expansion-with-mingw-w64.patch
new file mode 100755
index 0000000..6c5b9f8
--- /dev/null
+++ b/patches/gnupg2-2.0.26/0001-Enable-wildcard-expansion-with-mingw-w64.patch
@@ -0,0 +1,34 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From f80d5af3ad8705cf439db380cc846a647d67bcbd Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke at intevation.de>
+Date: Tue, 12 Aug 2014 21:22:23 +0200
+Subject: [PATCH] Enable wildcard expansion with mingw-w64
+
+    * g10/gpg.c: Define _dowildcard = -1;
+
+--
+    If this value is defined wildcard support in the c runtime
+    is enabled again. See mingw-w64 crt/CRT_glob.c
+---
+ g10/gpg.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/g10/gpg.c b/g10/gpg.c
+index 1a8e6e7..437e7f0 100644
+--- a/g10/gpg.c
++++ b/g10/gpg.c
+@@ -68,6 +68,9 @@
+ #define MY_O_BINARY  0
+ #endif
+
++#ifdef __MINGW32__
++int _dowildcard = -1;
++#endif
+
+ enum cmd_and_opt_values
+   {
+--
+1.9.1

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                               |    5 +
 patches/gnupg2-2.0.20/02-allow-mark-trusted.patch  |  102 -------------
 patches/gnupg2-2.0.21/01-scd-varlen.patch          |   76 ----------
 patches/gnupg2-2.0.21/02-scd-spr532.patch          |  152 --------------------
 ...-Enable-wildcard-expansion-with-mingw-w64.patch |   34 +++++
 5 files changed, 39 insertions(+), 330 deletions(-)
 delete mode 100755 patches/gnupg2-2.0.20/02-allow-mark-trusted.patch
 delete mode 100755 patches/gnupg2-2.0.21/01-scd-varlen.patch
 delete mode 100755 patches/gnupg2-2.0.21/02-scd-spr532.patch
 create mode 100755 patches/gnupg2-2.0.26/0001-Enable-wildcard-expansion-with-mingw-w64.patch


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list