[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.12-6-g21fc089
by Werner Koch
cvs at cvs.gnupg.org
Tue Dec 18 09:13:30 CET 2018
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 "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-2 has been updated
via 21fc089148678f59edb02e0e16bed65b709fb972 (commit)
via 16424d8a34c7f6af1071fd19dfc180cb7d17c052 (commit)
from ae9159e0685098ee97d6f526666524423f4a0fff (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 21fc089148678f59edb02e0e16bed65b709fb972
Author: Werner Koch <wk at gnupg.org>
Date: Mon Dec 17 18:46:26 2018 +0100
Silence compiler warnings new with gcc 8.
* dirmngr/dns.c: Include gpgrt.h. Silence -Warray-bounds also gcc.
* tests/gpgscm/scheme.c: Include gpgrt.h.
(Eval_Cycle): Ignore -Wimplicit-fallthrough.
--
The funny use of case and labels in the CASE macro seems confuse the
fallthrough detection.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/dirmngr/dns.c b/dirmngr/dns.c
index 77f83f4..968fc3d 100644
--- a/dirmngr/dns.c
+++ b/dirmngr/dns.c
@@ -77,6 +77,7 @@ typedef int socket_fd_t;
#include <netdb.h> /* struct addrinfo */
#endif
+#include "gpgrt.h" /* For GGPRT_GCC_VERSION */
#include "dns.h"
@@ -7521,9 +7522,13 @@ static unsigned char *dns_so_tcp_recv_buffer(struct dns_socket *so) {
}
-#if defined __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Warray-bounds"
+
+#if GPGRT_GCC_VERSION >= 80000
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#elif defined __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Warray-bounds"
#endif
static int dns_so_tcp_send(struct dns_socket *so) {
@@ -7589,8 +7594,10 @@ static int dns_so_tcp_recv(struct dns_socket *so) {
return 0;
} /* dns_so_tcp_recv() */
-#if __clang__
-#pragma clang diagnostic pop
+#if GPGRT_GCC_VERSION >= 80000
+# pragma GCC diagnostic pop
+#elif __clang__
+# pragma clang diagnostic pop
#endif
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 4384841..b188e36 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -44,6 +44,8 @@
# endif
#endif
+#include "gpgrt.h" /* For GGPRT_GCC_VERSION */
+
/* Used for documentation purposes, to signal functions in 'interface' */
#define INTERFACE
@@ -3438,6 +3440,11 @@ int list_length(scheme *sc, pointer a) {
+#if GPGRT_GCC_VERSION >= 80000
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
+
#define s_retbool(tf) s_return(sc,(tf) ? sc->T : sc->F)
/* kernel of this interpreter */
@@ -5323,6 +5330,11 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) {
}
}
+#if GPGRT_GCC_VERSION >= 80000
+# pragma GCC diagnostic pop
+#endif
+
+
typedef int (*test_predicate)(pointer);
static int is_any(pointer p) {
commit 16424d8a34c7f6af1071fd19dfc180cb7d17c052
Author: Werner Koch <wk at gnupg.org>
Date: Tue Dec 18 08:21:03 2018 +0100
wks: Do not use compression for the encrypted data.
* tools/gpg-wks-client.c (encrypt_response): Add arg -z0.
* tools/gpg-wks-server.c (encrypt_stream): Ditto.
--
If for example a server was built without the development packages of
the compression libraries installed, the server will not be able to
decrypt a request. In theory this can't happen due to the preference
system but it is just to easy to create the server's key using a
different version of gpg and then use gpg-wks-server built
differently.
For the short messages we exchange compression is not really required
and thus we better do without to make the system more robust.
Signed-off-by: Werner Koch <wk at gnupg.org>
(cherry picked from commit 70a8db0333e3c22403b3647f8b5f924f6dace719)
diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c
index c8ff166..78e4fe4 100644
--- a/tools/gpg-wks-client.c
+++ b/tools/gpg-wks-client.c
@@ -1151,6 +1151,7 @@ encrypt_response (estream_t *r_output, estream_t input, const char *addrspec,
ccparray_put (&ccp, "--status-fd=2");
ccparray_put (&ccp, "--always-trust");
ccparray_put (&ccp, "--armor");
+ ccparray_put (&ccp, "-z0"); /* No compression for improved robustness. */
if (fake_submission_addr)
ccparray_put (&ccp, "--auto-key-locate=clear,local");
else
diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c
index 1a0ba8f..f83ef65 100644
--- a/tools/gpg-wks-server.c
+++ b/tools/gpg-wks-server.c
@@ -586,6 +586,7 @@ encrypt_stream (estream_t *r_output, estream_t input, const char *keyfile)
ccparray_put (&ccp, "--always-trust");
ccparray_put (&ccp, "--no-keyring");
ccparray_put (&ccp, "--armor");
+ ccparray_put (&ccp, "-z0"); /* No compression for improved robustness. */
ccparray_put (&ccp, "--recipient-file");
ccparray_put (&ccp, keyfile);
ccparray_put (&ccp, "--encrypt");
-----------------------------------------------------------------------
Summary of changes:
dirmngr/dns.c | 17 ++++++++++++-----
tests/gpgscm/scheme.c | 12 ++++++++++++
tools/gpg-wks-client.c | 1 +
tools/gpg-wks-server.c | 1 +
4 files changed, 26 insertions(+), 5 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list