upgrade to 2.1.11

This commit is contained in:
Tomas Mraz 2016-02-16 13:44:26 +01:00
parent dbff323d66
commit 5150ef0add
9 changed files with 292 additions and 269 deletions

2
.gitignore vendored
View File

@ -36,3 +36,5 @@ gnupg-2.0.16.tar.bz2.sig
/gnupg-2.1.9.tar.bz2.sig /gnupg-2.1.9.tar.bz2.sig
/gnupg-2.1.10.tar.bz2 /gnupg-2.1.10.tar.bz2
/gnupg-2.1.10.tar.bz2.sig /gnupg-2.1.10.tar.bz2.sig
/gnupg-2.1.11.tar.bz2
/gnupg-2.1.11.tar.bz2.sig

View File

@ -1,56 +0,0 @@
diff -up gnupg-2.1.10/dirmngr/Makefile.am.build gnupg-2.1.10/dirmngr/Makefile.am
--- gnupg-2.1.10/dirmngr/Makefile.am.build 2015-11-30 17:39:52.000000000 +0100
+++ gnupg-2.1.10/dirmngr/Makefile.am 2015-12-07 16:14:06.865576290 +0100
@@ -131,7 +131,7 @@ endif
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
- $(GPG_ERROR_CFLAGS)
+ $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
t_http_LDADD = $(t_common_ldadd) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
@@ -139,7 +139,7 @@ t_ldap_parse_uri_SOURCES = \
t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1
diff -up gnupg-2.1.10/dirmngr/Makefile.in.build gnupg-2.1.10/dirmngr/Makefile.in
--- gnupg-2.1.10/dirmngr/Makefile.in.build 2015-12-04 10:57:05.000000000 +0100
+++ gnupg-2.1.10/dirmngr/Makefile.in 2015-12-07 16:14:06.866576314 +0100
@@ -608,7 +608,7 @@ module_tests = t-dns-stuff $(am__append_
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
- $(GPG_ERROR_CFLAGS)
+ $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
t_http_LDADD = $(t_common_ldadd) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
@@ -618,7 +618,7 @@ t_ldap_parse_uri_SOURCES = \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1
t_dns_stuff_SOURCES = t-dns-stuff.c dns-stuff.c
diff -up gnupg-2.1.10/tests/openpgp/gpgtar.test.build gnupg-2.1.10/tests/openpgp/gpgtar.test
--- gnupg-2.1.10/tests/openpgp/gpgtar.test.build 2015-11-30 17:39:52.000000000 +0100
+++ gnupg-2.1.10/tests/openpgp/gpgtar.test 2015-12-07 16:29:25.625224112 +0100
@@ -30,6 +30,10 @@ GPGARGS="--trust-model=always"
GPGTAR="../../tools/gpgtar"
GPGZIP="sh ../../tools/gpg-zip"
+if [ ! -f "$GPGTAR" ] ; then
+ exit 77
+fi
+
for TOOL in "$GPGTAR" "$GPGZIP"
do
rm -rf -- "${TESTDIR}"

View File

@ -55,7 +55,16 @@ diff -up gnupg-2.1.10/g10/sign.c.file-is-digest gnupg-2.1.10/g10/sign.c
#ifdef HAVE_DOSISH_SYSTEM #ifdef HAVE_DOSISH_SYSTEM
@@ -681,8 +682,12 @@ write_signature_packets (SK_LIST sk_list @@ -658,6 +659,8 @@ write_signature_packets (SK_LIST sk_list
if (duration || opt.sig_policy_url
|| opt.sig_notations || opt.sig_keyserver_url)
sig->version = 4;
+ else if (opt.file_is_digest)
+ sig->version = 3;
else
sig->version = pk->version;
@@ -681,8 +684,10 @@ write_signature_packets (SK_LIST sk_list
mk_notation_policy_etc (sig, NULL, pk); mk_notation_policy_etc (sig, NULL, pk);
} }
@ -64,8 +73,6 @@ diff -up gnupg-2.1.10/g10/sign.c.file-is-digest gnupg-2.1.10/g10/sign.c
+ if (!opt.file_is_digest) { + if (!opt.file_is_digest) {
+ hash_sigversion_to_magic (md, sig); + hash_sigversion_to_magic (md, sig);
+ gcry_md_final (md); + gcry_md_final (md);
+ } else if (sig->version >= 4) {
+ log_bug("file-is-digest doesn't work with v4 sigs\n");
+ } + }
rc = do_sign (pk, sig, md, hash_for (pk), cache_nonce); rc = do_sign (pk, sig, md, hash_for (pk), cache_nonce);

View File

@ -1,193 +0,0 @@
diff -up gnupg-2.1.10/tools/Makefile.am.insttools gnupg-2.1.10/tools/Makefile.am
--- gnupg-2.1.10/tools/Makefile.am.insttools 2015-11-30 11:39:52.000000000 -0500
+++ gnupg-2.1.10/tools/Makefile.am 2016-01-13 17:39:33.068399050 -0500
@@ -35,8 +35,8 @@ AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ER
sbin_SCRIPTS = addgnupghome applygnupgdefaults
if HAVE_USTAR
-# bin_SCRIPTS += gpg-zip
-noinst_SCRIPTS = gpg-zip
+bin_SCRIPTS = gpg-zip
+#noinst_SCRIPTS = gpg-zip
endif
if BUILD_SYMCRYPTRUN
@@ -51,13 +51,12 @@ else
gpgtar =
endif
-# Fixme: We should remove the gpgkey2ssh tool.
bin_PROGRAMS = gpgconf gpg-connect-agent ${symcryptrun}
if !HAVE_W32_SYSTEM
bin_PROGRAMS += watchgnupg gpgparsemail
endif
if !HAVE_W32CE_SYSTEM
-bin_PROGRAMS += gpgkey2ssh ${gpgtar}
+bin_PROGRAMS += ${gpgtar} gpgsplit
endif
if !DISABLE_REGEX
@@ -65,7 +64,7 @@ libexec_PROGRAMS = gpg-check-pattern
endif
if !HAVE_W32CE_SYSTEM
-noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
+noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgkey2ssh
endif
common_libs = $(libcommon)
diff -up gnupg-2.1.10/tools/Makefile.in.insttools gnupg-2.1.10/tools/Makefile.in
--- gnupg-2.1.10/tools/Makefile.in.insttools 2015-12-04 04:57:06.000000000 -0500
+++ gnupg-2.1.10/tools/Makefile.in 2016-01-13 17:39:48.298399050 -0500
@@ -139,12 +139,12 @@ DIST_COMMON = $(top_srcdir)/am/cmacros.a
bin_PROGRAMS = gpgconf$(EXEEXT) gpg-connect-agent$(EXEEXT) \
$(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4)
@HAVE_W32_SYSTEM_FALSE@am__append_9 = watchgnupg gpgparsemail
-@HAVE_W32CE_SYSTEM_FALSE@am__append_10 = gpgkey2ssh ${gpgtar}
+@HAVE_W32CE_SYSTEM_FALSE@am__append_10 = ${gpgtar} gpgsplit
@DISABLE_REGEX_FALSE@libexec_PROGRAMS = gpg-check-pattern$(EXEEXT)
@HAVE_W32CE_SYSTEM_FALSE@noinst_PROGRAMS = clean-sat$(EXEEXT) \
@HAVE_W32CE_SYSTEM_FALSE@ mk-tdata$(EXEEXT) \
@HAVE_W32CE_SYSTEM_FALSE@ make-dns-cert$(EXEEXT) \
-@HAVE_W32CE_SYSTEM_FALSE@ gpgsplit$(EXEEXT)
+@HAVE_W32CE_SYSTEM_FALSE@ gpgkey2ssh$(EXEEXT)
subdir = tools
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \
@@ -170,10 +170,10 @@ CONFIG_CLEAN_VPATH_FILES =
@HAVE_W32_SYSTEM_FALSE@am__EXEEXT_2 = watchgnupg$(EXEEXT) \
@HAVE_W32_SYSTEM_FALSE@ gpgparsemail$(EXEEXT)
@BUILD_GPGTAR_TRUE@am__EXEEXT_3 = gpgtar$(EXEEXT)
-@HAVE_W32CE_SYSTEM_FALSE@am__EXEEXT_4 = gpgkey2ssh$(EXEEXT) \
-@HAVE_W32CE_SYSTEM_FALSE@ $(am__EXEEXT_3)
+@HAVE_W32CE_SYSTEM_FALSE@am__EXEEXT_4 = $(am__EXEEXT_3) \
+@HAVE_W32CE_SYSTEM_FALSE@ gpgsplit$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
- "$(DESTDIR)$(sbindir)"
+ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(noinst_PROGRAMS)
clean_sat_SOURCES = clean-sat.c
clean_sat_OBJECTS = clean-sat.$(OBJEXT)
@@ -285,7 +285,7 @@ am__uninstall_files_from_dir = { \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
-SCRIPTS = $(noinst_SCRIPTS) $(sbin_SCRIPTS)
+SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -564,10 +564,9 @@ libcommontls = ../common/libcommontls.a
libcommontlsnpth = ../common/libcommontlsnpth.a
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
sbin_SCRIPTS = addgnupghome applygnupgdefaults
-
-# bin_SCRIPTS += gpg-zip
-@HAVE_USTAR_TRUE@noinst_SCRIPTS = gpg-zip
+@HAVE_USTAR_TRUE@bin_SCRIPTS = gpg-zip
@BUILD_SYMCRYPTRUN_FALSE@symcryptrun =
+#noinst_SCRIPTS = gpg-zip
@BUILD_SYMCRYPTRUN_TRUE@symcryptrun = symcryptrun
@BUILD_GPGTAR_FALSE@gpgtar =
@BUILD_GPGTAR_TRUE@gpgtar = gpgtar
@@ -806,6 +805,41 @@ symcryptrun$(EXEEXT): $(symcryptrun_OBJE
watchgnupg$(EXEEXT): $(watchgnupg_OBJECTS) $(watchgnupg_DEPENDENCIES) $(EXTRA_watchgnupg_DEPENDENCIES)
@rm -f watchgnupg$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(watchgnupg_OBJECTS) $(watchgnupg_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
install-sbinSCRIPTS: $(sbin_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
@@ -1066,7 +1100,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -1128,8 +1162,8 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
- install-sbinSCRIPTS
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+ install-libexecPROGRAMS install-sbinSCRIPTS
install-html: install-html-am
@@ -1168,8 +1202,8 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
- uninstall-sbinSCRIPTS
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-libexecPROGRAMS uninstall-sbinSCRIPTS
.MAKE: install-am install-strip
@@ -1178,16 +1212,17 @@ uninstall-am: uninstall-binPROGRAMS unin
clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am \
- install-libexecPROGRAMS install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-sbinSCRIPTS install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
- uninstall-sbinSCRIPTS
+ install-binPROGRAMS install-binSCRIPTS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libexecPROGRAMS install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-libexecPROGRAMS uninstall-sbinSCRIPTS
@HAVE_W32_SYSTEM_TRUE@.rc.o:

88
gnupg-2.1.11-build.patch Normal file
View File

@ -0,0 +1,88 @@
diff -up gnupg-2.1.11/configure.ac.build gnupg-2.1.11/configure.ac
--- gnupg-2.1.11/configure.ac.build 2016-01-26 10:36:37.000000000 +0100
+++ gnupg-2.1.11/configure.ac 2016-02-01 17:51:47.173400243 +0100
@@ -89,8 +89,8 @@ AC_GNU_SOURCE
# CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd
# like to use -Werror with our build.
-CFLAGS_orig=$CFLAGS
-CFLAGS=
+#CFLAGS_orig=$CFLAGS
+#CFLAGS=
# Some status variables.
have_gpg_error=no
@@ -1585,7 +1585,7 @@ AC_ARG_ENABLE(optimization,
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.11/configure.build gnupg-2.1.11/configure
--- gnupg-2.1.11/configure.build 2016-01-26 13:54:50.000000000 +0100
+++ gnupg-2.1.11/configure 2016-02-01 17:52:58.736827069 +0100
@@ -5039,8 +5039,8 @@ $as_echo "$ac_cv_safe_to_define___extens
# CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd
# like to use -Werror with our build.
-CFLAGS_orig=$CFLAGS
-CFLAGS=
+#CFLAGS_orig=$CFLAGS
+#CFLAGS=
# Some status variables.
have_gpg_error=no
@@ -15353,7 +15353,7 @@ fi
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.11/dirmngr/Makefile.am.build gnupg-2.1.11/dirmngr/Makefile.am
--- gnupg-2.1.11/dirmngr/Makefile.am.build 2016-01-26 10:36:37.000000000 +0100
+++ gnupg-2.1.11/dirmngr/Makefile.am 2016-02-01 17:46:13.840412143 +0100
@@ -132,7 +132,7 @@ endif
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
- $(GPG_ERROR_CFLAGS)
+ $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
t_http_LDADD = $(t_common_ldadd) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
@@ -140,7 +140,7 @@ t_ldap_parse_uri_SOURCES = \
t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1
diff -up gnupg-2.1.11/dirmngr/Makefile.in.build gnupg-2.1.11/dirmngr/Makefile.in
--- gnupg-2.1.11/dirmngr/Makefile.in.build 2016-01-26 13:54:48.000000000 +0100
+++ gnupg-2.1.11/dirmngr/Makefile.in 2016-02-01 17:46:13.840412143 +0100
@@ -640,7 +640,7 @@ module_tests = t-dns-stuff $(am__append_
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
- $(GPG_ERROR_CFLAGS)
+ $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
t_http_LDADD = $(t_common_ldadd) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
@@ -650,7 +650,7 @@ t_ldap_parse_uri_SOURCES = \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1
t_dns_stuff_SOURCES = t-dns-stuff.c dns-stuff.c

View File

@ -0,0 +1,136 @@
From acac103ba5772ae738ce5409d17feab80596cde6 Mon Sep 17 00:00:00 2001
From: "Neal H. Walfield" <neal@g10code.com>
Date: Fri, 12 Feb 2016 22:12:21 +0100
Subject: [PATCH 1/1] common: Change simple_query to ignore status messages.
* common/simple-pwquery.c (simple_query): Ignore status messages.
--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
GnuPG-bug-id: 2229
---
common/simple-pwquery.c | 95 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 67 insertions(+), 28 deletions(-)
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
index 90d04c0..b2d666c 100644
--- a/common/simple-pwquery.c
+++ b/common/simple-pwquery.c
@@ -618,6 +618,7 @@ simple_query (const char *query)
int fd = -1;
int nread;
char response[500];
+ int have = 0;
int rc;
rc = agent_open (&fd);
@@ -628,40 +629,78 @@ simple_query (const char *query)
if (rc)
goto leave;
- /* get response */
- nread = readline (fd, response, 499);
- if (nread < 0)
- {
- rc = -nread;
- goto leave;
- }
- if (nread < 3)
+ while (1)
{
- rc = SPWQ_PROTOCOL_ERROR;
- goto leave;
- }
+ if (! have || ! strchr (response, '\n'))
+ /* get response */
+ {
+ nread = readline (fd, &response[have],
+ sizeof (response) - 1 /* NUL */ - have);
+ if (nread < 0)
+ {
+ rc = -nread;
+ goto leave;
+ }
+ have += nread;
+ if (have < 3)
+ {
+ rc = SPWQ_PROTOCOL_ERROR;
+ goto leave;
+ }
+ response[have] = 0;
+ }
- if (response[0] == 'O' && response[1] == 'K')
- /* OK, do nothing. */;
- else if ((nread > 7 && !memcmp (response, "ERR 111", 7)
- && (response[7] == ' ' || response[7] == '\n') )
- || ((nread > 4 && !memcmp (response, "ERR ", 4)
- && (strtoul (response+4, NULL, 0) & 0xffff) == 99)) )
- {
- /* 111 is the old Assuan code for canceled which might still
- be in use by old installations. 99 is GPG_ERR_CANCELED as
- used by modern gpg-agents; 0xffff is used to mask out the
- error source. */
+ if (response[0] == 'O' && response[1] == 'K')
+ /* OK, do nothing. */;
+ else if ((nread > 7 && !memcmp (response, "ERR 111", 7)
+ && (response[7] == ' ' || response[7] == '\n') )
+ || ((nread > 4 && !memcmp (response, "ERR ", 4)
+ && (strtoul (response+4, NULL, 0) & 0xffff) == 99)) )
+ {
+ /* 111 is the old Assuan code for canceled which might still
+ be in use by old installations. 99 is GPG_ERR_CANCELED as
+ used by modern gpg-agents; 0xffff is used to mask out the
+ error source. */
#ifdef SPWQ_USE_LOGGING
- log_info (_("canceled by user\n") );
+ log_info (_("canceled by user\n") );
#endif
- }
- else
- {
+ }
+ else if (response[0] == 'S' && response[1] == ' ')
+ {
+ char *nextline;
+ int consumed;
+
+ nextline = strchr (response, '\n');
+ if (! nextline)
+ /* Point to the NUL. */
+ nextline = &response[have];
+ else
+ /* Move past the \n. */
+ nextline ++;
+
+ consumed = (size_t) nextline - (size_t) response;
+
+ /* Skip any additional newlines. */
+ while (consumed < have && response[consumed] == '\n')
+ consumed ++;
+
+ have -= consumed;
+
+ if (have)
+ memmove (response, &response[consumed], have + 1);
+
+ continue;
+ }
+ else
+ {
#ifdef SPWQ_USE_LOGGING
- log_error (_("problem with the agent\n"));
+ log_error (_("problem with the agent (unexpected response \"%s\"\n"),
+ response);
#endif
- rc = SPWQ_ERR_RESPONSE;
+ rc = SPWQ_ERR_RESPONSE;
+ }
+
+ break;
}
leave:
--
2.1.4

View File

@ -0,0 +1,42 @@
diff -up gnupg-2.1.11/tools/Makefile.am.insttools gnupg-2.1.11/tools/Makefile.am
--- gnupg-2.1.11/tools/Makefile.am.insttools 2016-01-26 10:36:37.000000000 +0100
+++ gnupg-2.1.11/tools/Makefile.am 2016-02-01 17:22:34.177267793 +0100
@@ -51,7 +51,7 @@ else
gpgtar =
endif
-bin_PROGRAMS = gpgconf gpg-connect-agent ${symcryptrun}
+bin_PROGRAMS = gpgconf gpg-connect-agent ${symcryptrun} gpgsplit
if !HAVE_W32_SYSTEM
bin_PROGRAMS += watchgnupg gpgparsemail
endif
@@ -64,7 +64,7 @@ libexec_PROGRAMS = gpg-check-pattern
endif
if !HAVE_W32CE_SYSTEM
-noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
+noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert
endif
common_libs = $(libcommon)
diff -up gnupg-2.1.11/tools/Makefile.in.insttools gnupg-2.1.11/tools/Makefile.in
--- gnupg-2.1.11/tools/Makefile.in.insttools 2016-01-26 13:54:49.000000000 +0100
+++ gnupg-2.1.11/tools/Makefile.in 2016-02-01 17:25:02.922105343 +0100
@@ -136,15 +136,14 @@ DIST_COMMON = $(top_srcdir)/am/cmacros.a
@GNUPG_PROTECT_TOOL_PGM_TRUE@am__append_6 = -DGNUPG_DEFAULT_PROTECT_TOOL="\"@GNUPG_PROTECT_TOOL_PGM@\""
@GNUPG_DIRMNGR_LDAP_PGM_TRUE@am__append_7 = -DGNUPG_DEFAULT_DIRMNGR_LDAP="\"@GNUPG_DIRMNGR_LDAP_PGM@\""
@HAVE_W32_SYSTEM_TRUE@am__append_8 = gpg-connect-agent-w32info.o
-bin_PROGRAMS = gpgconf$(EXEEXT) gpg-connect-agent$(EXEEXT) \
+bin_PROGRAMS = gpgconf$(EXEEXT) gpg-connect-agent$(EXEEXT) gpgsplit$(EXEEXT) \
$(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4)
@HAVE_W32_SYSTEM_FALSE@am__append_9 = watchgnupg gpgparsemail
@HAVE_W32CE_SYSTEM_FALSE@am__append_10 = ${gpgtar}
@DISABLE_REGEX_FALSE@libexec_PROGRAMS = gpg-check-pattern$(EXEEXT)
@HAVE_W32CE_SYSTEM_FALSE@noinst_PROGRAMS = clean-sat$(EXEEXT) \
@HAVE_W32CE_SYSTEM_FALSE@ mk-tdata$(EXEEXT) \
-@HAVE_W32CE_SYSTEM_FALSE@ make-dns-cert$(EXEEXT) \
-@HAVE_W32CE_SYSTEM_FALSE@ gpgsplit$(EXEEXT)
+@HAVE_W32CE_SYSTEM_FALSE@ make-dns-cert$(EXEEXT)
subdir = tools
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \

View File

@ -1,7 +1,7 @@
Summary: Utility for secure communication and data storage Summary: Utility for secure communication and data storage
Name: gnupg2 Name: gnupg2
Version: 2.1.10 Version: 2.1.11
Release: 4%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
Group: Applications/System Group: Applications/System
@ -9,14 +9,15 @@ Source0: ftp://ftp.gnupg.org/gcrypt/%{?pre:alpha/}gnupg/gnupg-%{version}%{?pre}.
Source1: ftp://ftp.gnupg.org/gcrypt/%{?pre:alpha/}gnupg/gnupg-%{version}%{?pre}.tar.bz2.sig Source1: ftp://ftp.gnupg.org/gcrypt/%{?pre:alpha/}gnupg/gnupg-%{version}%{?pre}.tar.bz2.sig
# svn export svn://cvs.gnupg.org/gnupg/trunk gnupg2; tar cjf gnupg-<date>svn.tar.bz2 gnupg2 # svn export svn://cvs.gnupg.org/gnupg/trunk gnupg2; tar cjf gnupg-<date>svn.tar.bz2 gnupg2
#Source0: gnupg2-20090809svn.tar.bz2 #Source0: gnupg2-20090809svn.tar.bz2
Patch1: gnupg-2.1.10-insttools.patch Patch1: gnupg-2.1.11-insttools.patch
# needed for compatibility with system FIPS mode # needed for compatibility with system FIPS mode
Patch3: gnupg-2.1.10-secmem.patch Patch3: gnupg-2.1.10-secmem.patch
# non-upstreamable patch adding file-is-digest option needed for Copr # non-upstreamable patch adding file-is-digest option needed for Copr
Patch4: gnupg-2.1.10-file-is-digest.patch Patch4: gnupg-2.1.10-file-is-digest.patch
Patch5: gnupg-2.1.1-ocsp-keyusage.patch Patch5: gnupg-2.1.1-ocsp-keyusage.patch
Patch6: gnupg-2.1.1-fips-algo.patch Patch6: gnupg-2.1.1-fips-algo.patch
Patch7: gnupg-2.1.10-build.patch Patch7: gnupg-2.1.11-build.patch
Patch8: gnupg-2.1.11-fix-tests.patch
URL: http://www.gnupg.org/ URL: http://www.gnupg.org/
@ -90,6 +91,7 @@ to the base GnuPG package
%patch5 -p1 -b .keyusage %patch5 -p1 -b .keyusage
%patch6 -p1 -b .fips %patch6 -p1 -b .fips
%patch7 -p1 -b .build %patch7 -p1 -b .build
%patch8 -p1 -b .fix-tests
# pcsc-lite library major: 0 in 1.2.0, 1 in 1.2.9+ (dlopen()'d in pcsc-wrapper) # pcsc-lite library major: 0 in 1.2.0, 1 in 1.2.9+ (dlopen()'d in pcsc-wrapper)
# Note: this is just the name of the default shared lib to load in scdaemon, # Note: this is just the name of the default shared lib to load in scdaemon,
@ -103,9 +105,7 @@ sed -i -e 's/"libpcsclite\.so"/"%{pcsclib}"/' scd/scdaemon.c
%configure \ %configure \
--disable-rpath \ --disable-rpath \
--disable-gpgtar \ --enable-g13
--enable-g13 \
--enable-standard-socket
# need scratch gpg database for tests # need scratch gpg database for tests
mkdir -p $HOME/.gnupg mkdir -p $HOME/.gnupg
@ -119,9 +119,7 @@ make install DESTDIR=%{buildroot} \
docdir=%{_pkgdocdir} docdir=%{_pkgdocdir}
%if ! (0%{?rhel} > 5) %if ! (0%{?rhel} > 5)
# drop file conflicting with gnupg-1.x # rename file conflicting with gnupg-1.x
rm -f %{buildroot}%{_mandir}/man1/gpg-zip.1*
# and rename another
rename gnupg.7 gnupg2.7 %{buildroot}%{_mandir}/man7/gnupg.7* rename gnupg.7 gnupg2.7 %{buildroot}%{_mandir}/man7/gnupg.7*
%endif %endif
@ -165,7 +163,6 @@ fi
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING %license COPYING
#doc AUTHORS ChangeLog NEWS README THANKS TODO #doc AUTHORS ChangeLog NEWS README THANKS TODO
@ -173,13 +170,13 @@ fi
%dir %{_sysconfdir}/gnupg %dir %{_sysconfdir}/gnupg
%ghost %config(noreplace) %{_sysconfdir}/gnupg/gpgconf.conf %ghost %config(noreplace) %{_sysconfdir}/gnupg/gpgconf.conf
## docs say to install suid root, but fedora/rh security folk say not to ## docs say to install suid root, but fedora/rh security folk say not to
#attr(4755,root,root) %{_bindir}/gpg2
%{_bindir}/gpg2 %{_bindir}/gpg2
%{_bindir}/gpgv2 %{_bindir}/gpgv2
%{_bindir}/gpg-connect-agent %{_bindir}/gpg-connect-agent
%{_bindir}/gpg-agent %{_bindir}/gpg-agent
%{_bindir}/gpgconf %{_bindir}/gpgconf
%{_bindir}/gpgparsemail %{_bindir}/gpgparsemail
%{_bindir}/gpgtar
%{_bindir}/g13 %{_bindir}/g13
%{_bindir}/dirmngr %{_bindir}/dirmngr
%{_bindir}/dirmngr-client %{_bindir}/dirmngr-client
@ -188,8 +185,6 @@ fi
%{_bindir}/gpgv %{_bindir}/gpgv
%{_bindir}/gpgsplit %{_bindir}/gpgsplit
%{_bindir}/gpg-zip %{_bindir}/gpg-zip
%else
%{_bindir}/gpgkey2ssh
%endif %endif
%{_bindir}/watchgnupg %{_bindir}/watchgnupg
%{_sbindir}/* %{_sbindir}/*
@ -203,7 +198,6 @@ fi
%exclude %{_libexecdir}/scdaemon %exclude %{_libexecdir}/scdaemon
%files smime %files smime
%defattr(-,root,root,-)
%{_bindir}/gpgsm* %{_bindir}/gpgsm*
%{_bindir}/kbxutil %{_bindir}/kbxutil
%{_libexecdir}/scdaemon %{_libexecdir}/scdaemon
@ -213,6 +207,9 @@ fi
%changelog %changelog
* Tue Feb 16 2016 Tomáš Mráz <tmraz@redhat.com> - 2.1.11-1
- upgrade to 2.1.11
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.10-4 * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1,2 +1,2 @@
f0a7cb09fe119f8b82eba7efecd27dc0 gnupg-2.1.10.tar.bz2 873302c475c4c90badb67daac90ebd5d gnupg-2.1.11.tar.bz2
a57f611b9393e20cc40af6959d3e1084 gnupg-2.1.10.tar.bz2.sig 05d72ca31c0953ac5aeaa4305df8a57c gnupg-2.1.11.tar.bz2.sig