[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.2.1-43-gca86f90

by Andre Heinecke cvs at cvs.gnupg.org
Tue Aug 26 10:41:37 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  ca86f90445e3fd182119ca4f4301db3079e38458 (commit)
      from  effddf379e5aa038449fb17e4f757cf464d217a2 (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 ca86f90445e3fd182119ca4f4301db3079e38458
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Aug 26 10:41:00 2014 +0200

    Add patch for positional params in passphrase dlg
    
        * NEWS: Mention that this fixes french pinentry dialog.
        * patches/gnupg2-2.0.26/
        0003-gpg-Allow-for-positional-parameters-in-the-passphras.patch:
        New.

diff --git a/NEWS b/NEWS
index 8a3ee99..e719685 100644
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,10 @@ Noteworthy changes in version 2.2.2 (unreleased)
 (de) Kommandozeilen Ausgaben werden nun im zur Windows Konsole passenden
      Encoding ausgegeben.
 
+(en) The pinentry dialog is now translated correctly in the French locale.
+
+(de) Der Pinentry Dialog wird nun korrekt ins Französische übersetzt.
+
 ~~~~~~~~~~~~~~~
 GnuPG:          2.0.26
 Kleopatra:      2.2.0-gitac229d2
diff --git a/patches/gnupg2-2.0.26/0003-gpg-Allow-for-positional-parameters-in-the-passphras.patch b/patches/gnupg2-2.0.26/0003-gpg-Allow-for-positional-parameters-in-the-passphras.patch
new file mode 100755
index 0000000..cd8a3e7
--- /dev/null
+++ b/patches/gnupg2-2.0.26/0003-gpg-Allow-for-positional-parameters-in-the-passphras.patch
@@ -0,0 +1,77 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From c45b9819e8f4b35681c91ffb67abdc38dcc32a2a Mon Sep 17 00:00:00 2001
+From: Werner Koch <wk at gnupg.org>
+Date: Tue, 26 Aug 2014 10:16:04 +0200
+Subject: [PATCH 1/3] gpg: Allow for positional parameters in the passphrase
+ prompt.
+
+* g10/passphrase.c (passphrase_get): Replace sprintf by xasprintf.
+--
+
+Without that at least the French translation does not always work
+because it requires positional parameters.  Windows for example does
+not support them as they are not defined by C99 but by POSIX.
+---
+ g10/passphrase.c | 35 ++++++++++++-----------------------
+ 1 file changed, 12 insertions(+), 23 deletions(-)
+
+diff --git a/g10/passphrase.c b/g10/passphrase.c
+index 9752718..54caf72 100644
+--- a/g10/passphrase.c
++++ b/g10/passphrase.c
+@@ -341,38 +341,27 @@ passphrase_get ( u32 *keyid, int mode, const char *cacheid, int repeat,
+       if ( !algo_name )
+         algo_name = "?";
+
+-#define KEYIDSTRING _(" (main key ID %s)")
+-
+-      maink = xmalloc ( strlen (KEYIDSTRING) + keystrlen() + 20 );
+-      if( keyid[2] && keyid[3] && keyid[0] != keyid[2]
++      if (keyid[2] && keyid[3]
++          && keyid[0] != keyid[2]
+           && keyid[1] != keyid[3] )
+-        sprintf( maink, KEYIDSTRING, keystr(&keyid[2]) );
++        maink = xasprintf (_(" (main key ID %s)"), keystr (&keyid[2]));
+       else
+-        *maink = 0;
++        maink = xstrdup ("");
+
+       uid = get_user_id ( keyid, &uidlen );
+       timestr = strtimestamp (pk->timestamp);
+
+-#undef KEYIDSTRING
+-
+-#define PROMPTSTRING _("Please enter the passphrase to unlock the" \
+-		       " secret key for the OpenPGP certificate:\n" \
+-		       "\"%.*s\"\n" \
+-		       "%u-bit %s key, ID %s,\n" \
+-                       "created %s%s.\n" )
+-
+-      atext = xmalloc ( 100 + strlen (PROMPTSTRING)
+-                        + uidlen + 15 + strlen(algo_name) + keystrlen()
+-                        + strlen (timestr) + strlen (maink) );
+-      sprintf (atext, PROMPTSTRING,
+-               (int)uidlen, uid,
+-               nbits_from_pk (pk), algo_name, keystr(&keyid[0]), timestr,
+-               maink  );
++      atext = xasprintf (_("Please enter the passphrase to unlock the"
++                           " secret key for the OpenPGP certificate:\n"
++                           "\"%.*s\"\n"
++                           "%u-bit %s key, ID %s,\n"
++                           "created %s%s.\n"),
++                         (int)uidlen, uid,
++                         nbits_from_pk (pk), algo_name, keystr(&keyid[0]),
++                         timestr, maink);
+       xfree (uid);
+       xfree (maink);
+
+-#undef PROMPTSTRING
+-
+       {
+         size_t dummy;
+         fingerprint_from_pk( pk, fpr, &dummy );
+--
+1.9.1

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

Summary of changes:
 NEWS                                               |    4 +
 ...or-positional-parameters-in-the-passphras.patch |   77 ++++++++++++++++++++
 2 files changed, 81 insertions(+)
 create mode 100755 patches/gnupg2-2.0.26/0003-gpg-Allow-for-positional-parameters-in-the-passphras.patch


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



More information about the Gpg4win-commits mailing list