diff options
author | Werner Koch <wk@gnupg.org> | 2021-01-19 10:33:03 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2021-01-19 10:33:03 +0100 |
commit | 9500432b7ae10d98b30c58de4357e2ffb93bf795 (patch) | |
tree | 63ebc784ad1b417a75df15ccda1d2b335add61c9 /dirmngr | |
parent | tools: Add option --clock to watchgnupg (diff) | |
download | gnupg2-9500432b7ae10d98b30c58de4357e2ffb93bf795.tar.xz gnupg2-9500432b7ae10d98b30c58de4357e2ffb93bf795.zip |
Require Libgcrypt 1.9
* configure.ac: Require at least Libgcrypt 1.9.0. Remove all
GCRYPT_VERSION_NUMBER dependent code.
--
Only Libgcrypt 1.9 implements EAX which is a mandatory algorithm in
RFC4880bis.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'dirmngr')
-rw-r--r-- | dirmngr/dns-stuff.c | 24 | ||||
-rw-r--r-- | dirmngr/ks-engine-hkp.c | 3 |
2 files changed, 21 insertions, 6 deletions
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c index cdda86d63..0edbc0442 100644 --- a/dirmngr/dns-stuff.c +++ b/dirmngr/dns-stuff.c @@ -2461,15 +2461,27 @@ check_inet_support (int *r_v4, int *r_v6) log_debug ("%s: addr: %s\n", __func__, buffer); } } + } + + for (ai = aibuf; ai; ai = ai->ai_next) + { + if (ai->ai_family == AF_INET) + *r_v4 = 1; + } + for (ai = aibuf; ai; ai = ai->ai_next) + { if (ai->ai_family == AF_INET6) { struct sockaddr_in6 *v6addr = (struct sockaddr_in6 *)ai->ai_addr; - if (!IN6_IS_ADDR_LINKLOCAL (&v6addr->sin6_addr)) - *r_v6 = 1; - } - else if (ai->ai_family == AF_INET) - { - *r_v4 = 1; + if (!IN6_IS_ADDR_LINKLOCAL (&v6addr->sin6_addr) + && (!*r_v4 || !IN6_IS_ADDR_LOOPBACK (&v6addr->sin6_addr))) + { + /* We only assume v6 if we do not have a v4 address or + * if the address is not ::1. Linklocal never + * indicates v6 support. */ + *r_v6 = 1; + break; + } } } diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index b31557b60..93c676b6a 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -232,6 +232,9 @@ select_random_host (hostinfo_t hi) size_t tblsize; int pidx, idx; + /* CHECKTHIS(); See */ + /* https://sources.debian.org/patches/gnupg2/2.2.20-1/dirmngr-idling/dirmngr-hkp-Avoid-potential-race-condition-when-some.patch/ */ + /* We create a new table so that we randomly select only from currently alive hosts. */ for (idx = 0, tblsize = 0; |