[Pkg-gnupg-commit] [gnupg2] 10/16: import bugfixes from upstream
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Tue Feb 6 04:20:13 UTC 2018
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit fc9e414b588599d9c5682a5d24306c5599782682
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Wed Jan 3 13:14:43 2018 -0500
import bugfixes from upstream
---
...d-Increase-libassuan-min-version-to-2.5.0.patch | 31 +++++++++++
...r-buffer-for-homedir-in-case-of-64-bit-UI.patch | 33 +++++++++++
...futuredefault-as-alias-for-future-default.patch | 61 +++++++++++++++++++++
...e-of-cv25519-and-ed25519-in-the-keygen-pa.patch | 34 ++++++++++++
...tive-card-at-start-by-internal-CCID-drive.patch | 64 ++++++++++++++++++++++
debian/patches/series | 5 ++
6 files changed, 228 insertions(+)
diff --git a/debian/patches/build-Increase-libassuan-min-version-to-2.5.0.patch b/debian/patches/build-Increase-libassuan-min-version-to-2.5.0.patch
new file mode 100644
index 0000000..8eb4095
--- /dev/null
+++ b/debian/patches/build-Increase-libassuan-min-version-to-2.5.0.patch
@@ -0,0 +1,31 @@
+From: Kristian Fiskerstrand <kf at sumptuouscapital.com>
+Date: Wed, 20 Dec 2017 21:12:01 +0100
+Subject: build: Increase libassuan min version to 2.5.0
+
+--
+assuan_sock_set_system_hooks is used unconditionally in gnupg since
+commit 9f641430dcdecbd7ee205d407cb19bb4262aa95d, and as such it requires
+libassuan 2.5.0 (function introduced in
+commit 90dc81682b13a7cf716a8a26b891051cbd4b0caf)
+
+For a detailed description see:
+https://lists.gnupg.org/pipermail/gnupg-devel/2017-December/033323.html
+
+(cherry picked from commit a6849888295f0e0872c948cd72a59374bb867777)
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 15739ee..6f87e10 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -59,7 +59,7 @@ NEED_LIBGCRYPT_API=1
+ NEED_LIBGCRYPT_VERSION=1.7.0
+
+ NEED_LIBASSUAN_API=2
+-NEED_LIBASSUAN_VERSION=2.4.3
++NEED_LIBASSUAN_VERSION=2.5.0
+
+ NEED_KSBA_API=1
+ NEED_KSBA_VERSION=1.3.4
diff --git a/debian/patches/common-Use-larger-buffer-for-homedir-in-case-of-64-bit-UI.patch b/debian/patches/common-Use-larger-buffer-for-homedir-in-case-of-64-bit-UI.patch
new file mode 100644
index 0000000..4756bf6
--- /dev/null
+++ b/debian/patches/common-Use-larger-buffer-for-homedir-in-case-of-64-bit-UI.patch
@@ -0,0 +1,33 @@
+From: Werner Koch <wk at gnupg.org>
+Date: Wed, 20 Dec 2017 15:37:29 +0100
+Subject: common: Use larger buffer for homedir in case of 64 bit UIDs.
+
+* common/homedir.c (_gnupg_socketdir_internal): Enlarge PREFIX by 6
+bytes for "/gnupg".
+--
+
+The temporary buffer was to short for the extra "/gnupg". However the
+20 bytes for the UID is large enough for all 32 bit UIDs and would
+only fail (detected) if a 64 bit UID is used.
+
+Fixes-commit: 17efcd2a2acdc3b7f00711272aa51e5be2476921
+Reported-by: Rainer Perske.
+Signed-off-by: Werner Koch <wk at gnupg.org>
+(cherry picked from commit 290348e349e8d56a856f187a08e913f2ed525b3c)
+---
+ common/homedir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index a598900..65cf50f 100644
+--- a/common/homedir.c
++++ b/common/homedir.c
+@@ -554,7 +554,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned *r_info)
+ };
+ int i;
+ struct stat sb;
+- char prefix[13 + 1 + 20 + 6 + 1];
++ char prefix[19 + 1 + 20 + 6 + 1];
+ const char *s;
+ char *name = NULL;
+
diff --git a/debian/patches/gpg-Allow-futuredefault-as-alias-for-future-default.patch b/debian/patches/gpg-Allow-futuredefault-as-alias-for-future-default.patch
new file mode 100644
index 0000000..8d5c4e2
--- /dev/null
+++ b/debian/patches/gpg-Allow-futuredefault-as-alias-for-future-default.patch
@@ -0,0 +1,61 @@
+From: Werner Koch <wk at gnupg.org>
+Date: Mon, 1 Jan 2018 14:59:30 +0100
+Subject: gpg: Allow "futuredefault" as alias for "future-default".
+
+* g10/keygen.c (parse_key_parameter_string): Allow "futuredefault" and
+use case-insensitive matching
+(quick_generate_keypair): Ditto.
+(parse_algo_usage_expire): Ditto.
+--
+
+The man page is sometimes rendered in a way that the hyphen may be
+not be considered as part of the string. And while at it we also
+allow case-insensitivity.
+
+GnuPG-bug-id: 3655
+Signed-off-by: Werner Koch <wk at gnupg.org>
+(cherry picked from commit 4d3c500f4793eb263940ff5ef87ec4ead63c9b4b)
+---
+ g10/keygen.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/g10/keygen.c b/g10/keygen.c
+index 77d1b84..dc0f3f8 100644
+--- a/g10/keygen.c
++++ b/g10/keygen.c
+@@ -3152,9 +3152,10 @@ parse_key_parameter_string (const char *string, int part,
+ *r_subcurve = NULL;
+
+ if (!string || !*string
+- || !strcmp (string, "default") || !strcmp (string, "-"))
++ || !ascii_strcasecmp (string, "default") || !strcmp (string, "-"))
+ string = get_default_pubkey_algo ();
+- else if (!strcmp (string, "future-default"))
++ else if (!ascii_strcasecmp (string, "future-default")
++ || !ascii_strcasecmp (string, "futuredefault"))
+ string = FUTURE_STD_KEY_PARAM;
+
+ primary = xstrdup (string);
+@@ -3983,9 +3984,10 @@ quick_generate_keypair (ctrl_t ctrl, const char *uid, const char *algostr,
+ if (!*expirestr || strcmp (expirestr, "-") == 0)
+ expirestr = default_expiration_interval;
+
+- if ((!*algostr || !strcmp (algostr, "default")
+- || !strcmp (algostr, "future-default"))
+- && (!*usagestr || !strcmp (usagestr, "default")
++ if ((!*algostr || !ascii_strcasecmp (algostr, "default")
++ || !ascii_strcasecmp (algostr, "future-default")
++ || !ascii_strcasecmp (algostr, "futuredefault"))
++ && (!*usagestr || !ascii_strcasecmp (usagestr, "default")
+ || !strcmp (usagestr, "-")))
+ {
+ /* Use default key parameters. */
+@@ -4927,7 +4929,7 @@ parse_algo_usage_expire (ctrl_t ctrl, int for_subkey,
+
+ /* Parse the usage string. */
+ if (!usagestr || !*usagestr
+- || !strcmp (usagestr, "default") || !strcmp (usagestr, "-"))
++ || !ascii_strcasecmp (usagestr, "default") || !strcmp (usagestr, "-"))
+ ; /* Keep usage from parse_key_parameter_string. */
+ else if ((wantuse = parse_usagestr (usagestr)) != -1)
+ use = wantuse;
diff --git a/debian/patches/gpg-Allow-the-use-of-cv25519-and-ed25519-in-the-keygen-pa.patch b/debian/patches/gpg-Allow-the-use-of-cv25519-and-ed25519-in-the-keygen-pa.patch
new file mode 100644
index 0000000..0f26c4b
--- /dev/null
+++ b/debian/patches/gpg-Allow-the-use-of-cv25519-and-ed25519-in-the-keygen-pa.patch
@@ -0,0 +1,34 @@
+From: Werner Koch <wk at gnupg.org>
+Date: Fri, 29 Dec 2017 20:18:20 +0100
+Subject: gpg: Allow the use of "cv25519" and "ed25519" in the keygen parms.
+
+* g10/keygen.c (gen_ecc): Map curve names.
+--
+
+See
+https://lists.gnupg.org/pipermail/gnupg-users/2017-December/059619.html
+
+Signed-off-by: Werner Koch <wk at gnupg.org>
+(cherry picked from commit 412bb7a801f242d47a82712080cce6ddbb843166)
+---
+ g10/keygen.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/g10/keygen.c b/g10/keygen.c
+index 4354e92..77d1b84 100644
+--- a/g10/keygen.c
++++ b/g10/keygen.c
+@@ -1580,6 +1580,13 @@ gen_ecc (int algo, const char *curve, kbnode_t pub_root,
+ if (!curve || !*curve)
+ return gpg_error (GPG_ERR_UNKNOWN_CURVE);
+
++ /* Map the displayed short forms of some curves to their canonical
++ * names. */
++ if (!ascii_strcasecmp (curve, "cv25519"))
++ curve = "Curve25519";
++ else if (!ascii_strcasecmp (curve, "ed25519"))
++ curve = "Ed25519";
++
+ /* Note that we use the "comp" flag with EdDSA to request the use of
+ a 0x40 compression prefix octet. */
+ if (algo == PUBKEY_ALGO_EDDSA)
diff --git a/debian/patches/scd-Fix-for-inactive-card-at-start-by-internal-CCID-drive.patch b/debian/patches/scd-Fix-for-inactive-card-at-start-by-internal-CCID-drive.patch
new file mode 100644
index 0000000..3dd575a
--- /dev/null
+++ b/debian/patches/scd-Fix-for-inactive-card-at-start-by-internal-CCID-drive.patch
@@ -0,0 +1,64 @@
+From: NIIBE Yutaka <gniibe at fsij.org>
+Date: Wed, 27 Dec 2017 17:20:03 +0900
+Subject: scd: Fix for inactive card at start by internal CCID driver.
+
+* scd/ccid-driver.c (do_close_reader): Set NULL on close.
+(bulk_in): Move DEBUGOUT and check by EP_INTR.
+(ccid_get_atr): Clear powered_off flag after initial status check.
+
+--
+
+Many card readers automatically turn on inserted card, but some
+defaults to turning off at start.
+
+GnuPG-bug-id: 3508
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+(cherry picked from commit 4f88b0f56134af2ce56d434b7acd47fcf9b6f7cf)
+---
+ scd/ccid-driver.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
+index 4f4a32d..5046da5 100644
+--- a/scd/ccid-driver.c
++++ b/scd/ccid-driver.c
+@@ -1778,6 +1778,7 @@ do_close_reader (ccid_driver_t handle)
+ }
+
+ libusb_free_transfer (handle->transfer);
++ handle->transfer = NULL;
+ }
+ libusb_release_interface (handle->idev, handle->ifc_no);
+ --ccid_usb_thread_is_alive;
+@@ -2038,10 +2039,14 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
+ /*
+ * Communication failure by device side.
+ * Possibly, it was forcibly suspended and resumed.
++ *
++ * Only detect this kind of failure when interrupt transfer is
++ * not supported. For card reader with interrupt transfer
++ * support removal is detected by intr_cb.
+ */
+- DEBUGOUT ("CCID: card inactive/removed\n");
+- if (handle->transfer == NULL)
++ if (handle->ep_intr < 0)
+ {
++ DEBUGOUT ("CCID: card inactive/removed\n");
+ handle->powered_off = 1;
+ scd_kick_the_loop ();
+ }
+@@ -2539,6 +2544,14 @@ ccid_get_atr (ccid_driver_t handle,
+ if (statusbits == 2)
+ return CCID_DRIVER_ERR_NO_CARD;
+
++ /*
++ * In the first invocation of ccid_slot_status, card reader may
++ * return CCID_DRIVER_ERR_CARD_INACTIVE and handle->powered_off may
++ * become 1. Because inactive card is no problem (we are turning it
++ * ON here), clear the flag.
++ */
++ handle->powered_off = 0;
++
+ /* For an inactive and also for an active card, issue the PowerOn
+ command to get the ATR. */
+ again:
diff --git a/debian/patches/series b/debian/patches/series
index d33906d..45ad2c3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,3 +21,8 @@ update-defaults/gpg-Prefer-SHA-512-and-SHA-384-in-personal-digest.patch
from-master/gpg-Fix-comparison.patch
from-master/assuan-Reorganize-waiting-for-socket.patch
from-master/assuan-Use-exponential-decay-for-first-1s-of-spinlock.patch
+common-Use-larger-buffer-for-homedir-in-case-of-64-bit-UI.patch
+build-Increase-libassuan-min-version-to-2.5.0.patch
+scd-Fix-for-inactive-card-at-start-by-internal-CCID-drive.patch
+gpg-Allow-the-use-of-cv25519-and-ed25519-in-the-keygen-pa.patch
+gpg-Allow-futuredefault-as-alias-for-future-default.patch
--
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