mirror of https://github.com/getdnsapi/getdns.git
Merge branch 'develop' into release/1.1.0-alpha3
This commit is contained in:
commit
c0f20a9023
16
configure.ac
16
configure.ac
|
@ -563,10 +563,16 @@ fi
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
found_all_libs=1
|
found_all_libs=1
|
||||||
|
MISSING_DEPS=""
|
||||||
|
MISSING_SEP=""
|
||||||
if test $my_with_libidn = 1
|
if test $my_with_libidn = 1
|
||||||
then
|
then
|
||||||
AC_MSG_NOTICE([Checking for dependency libidn])
|
AC_MSG_NOTICE([Checking for dependency libidn])
|
||||||
AC_CHECK_LIB([idn], [idna_to_ascii_8z], [], [found_all_libs=0])
|
AC_CHECK_LIB([idn], [idna_to_ascii_8z], [], [
|
||||||
|
MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn"
|
||||||
|
MISSING_SEP=", "
|
||||||
|
found_all_libs=0
|
||||||
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(unbound-event-api, AC_HELP_STRING([--disable-unbound-event-api], [Disable usage of libunbounds event API]))
|
AC_ARG_ENABLE(unbound-event-api, AC_HELP_STRING([--disable-unbound-event-api], [Disable usage of libunbounds event API]))
|
||||||
|
@ -595,12 +601,16 @@ then
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
AC_CHECK_FUNCS([ub_ctx_set_stub])
|
AC_CHECK_FUNCS([ub_ctx_set_stub])
|
||||||
], [found_all_libs=0])
|
], [
|
||||||
|
MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libunbound"
|
||||||
|
MISSING_SEP=", "
|
||||||
|
found_all_libs=0
|
||||||
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $found_all_libs = 0
|
if test $found_all_libs = 0
|
||||||
then
|
then
|
||||||
AC_MSG_ERROR([One more dependencies is missing])
|
AC_MSG_ERROR([Missing dependencies: $MISSING_DEPS])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_PATH_PROG([DOXYGEN], [doxygen])
|
AC_PATH_PROG([DOXYGEN], [doxygen])
|
||||||
|
|
|
@ -3797,8 +3797,7 @@ getdns_context_get_suffix(getdns_context *context, getdns_list **value)
|
||||||
r = GETDNS_RETURN_GENERIC_ERROR;
|
r = GETDNS_RETURN_GENERIC_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((r = _getdns_list_append_const_bindata(
|
if ((r = _getdns_list_append_string(list, name)))
|
||||||
list, strlen(name) + 1, name)))
|
|
||||||
break;
|
break;
|
||||||
dname += dname_len;
|
dname += dname_len;
|
||||||
dname_len = *dname++;
|
dname_len = *dname++;
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "util-internal.h"
|
#include "util-internal.h"
|
||||||
|
|
||||||
#ifndef X509_STORE_CTX_get0_untrusted
|
#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
|
||||||
#define X509_STORE_CTX_get0_untrusted(store) store->untrusted
|
#define X509_STORE_CTX_get0_untrusted(store) store->untrusted
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -314,15 +314,27 @@ _getdns_get_pubkey_pinset_list(getdns_context *ctx,
|
||||||
see doc/HOWTO/proxy_certificates.txt as an example
|
see doc/HOWTO/proxy_certificates.txt as an example
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_get_ssl_getdns_upstream_idx()
|
#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
|
||||||
|
_get_ssl_getdns_upstream_idx(void)
|
||||||
|
#else
|
||||||
|
_get_ssl_getdns_upstream_idx(X509_STORE *store)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
static volatile int idx = -1;
|
static volatile int idx = -1;
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
/* CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); */
|
#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
|
||||||
|
CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
|
||||||
|
#else
|
||||||
|
X509_STORE_lock(store);
|
||||||
|
#endif
|
||||||
if (idx < 0)
|
if (idx < 0)
|
||||||
idx = SSL_get_ex_new_index(0, "associated getdns upstream",
|
idx = SSL_get_ex_new_index(0, "associated getdns upstream",
|
||||||
NULL,NULL,NULL);
|
NULL,NULL,NULL);
|
||||||
/* CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); */
|
#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
|
||||||
|
CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
|
||||||
|
#else
|
||||||
|
X509_STORE_unlock(store);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +342,11 @@ _get_ssl_getdns_upstream_idx()
|
||||||
getdns_upstream*
|
getdns_upstream*
|
||||||
_getdns_upstream_from_x509_store(X509_STORE_CTX *store)
|
_getdns_upstream_from_x509_store(X509_STORE_CTX *store)
|
||||||
{
|
{
|
||||||
|
#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
|
||||||
int uidx = _get_ssl_getdns_upstream_idx();
|
int uidx = _get_ssl_getdns_upstream_idx();
|
||||||
|
#else
|
||||||
|
int uidx = _get_ssl_getdns_upstream_idx(X509_STORE_CTX_get0_store(store));
|
||||||
|
#endif
|
||||||
int sslidx = SSL_get_ex_data_X509_STORE_CTX_idx();
|
int sslidx = SSL_get_ex_data_X509_STORE_CTX_idx();
|
||||||
const SSL *ssl;
|
const SSL *ssl;
|
||||||
|
|
||||||
|
@ -348,7 +364,11 @@ getdns_return_t
|
||||||
_getdns_associate_upstream_with_SSL(SSL *ssl,
|
_getdns_associate_upstream_with_SSL(SSL *ssl,
|
||||||
getdns_upstream *upstream)
|
getdns_upstream *upstream)
|
||||||
{
|
{
|
||||||
|
#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
|
||||||
int uidx = _get_ssl_getdns_upstream_idx();
|
int uidx = _get_ssl_getdns_upstream_idx();
|
||||||
|
#else
|
||||||
|
int uidx = _get_ssl_getdns_upstream_idx(SSL_CTX_get_cert_store(SSL_get_SSL_CTX(ssl)));
|
||||||
|
#endif
|
||||||
if (SSL_set_ex_data(ssl, uidx, upstream))
|
if (SSL_set_ex_data(ssl, uidx, upstream))
|
||||||
return GETDNS_RETURN_GOOD;
|
return GETDNS_RETURN_GOOD;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue