mirror of
https://github.com/nmap/nmap.git
synced 2025-12-26 17:39:03 +00:00
Replace check for DTLS_client_method with OPENSSL_NO_DTLS
This commit is contained in:
@@ -977,7 +977,7 @@ int ncat_connect(void)
|
||||
nsock_pool_set_broadcast(mypool, 1);
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#ifdef HAVE_DTLS_CLIENT_METHOD
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
if(o.proto == IPPROTO_UDP)
|
||||
set_ssl_ctx_options((SSL_CTX *) nsock_pool_dtls_init(mypool, 0));
|
||||
else
|
||||
|
||||
@@ -976,7 +976,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (o.proto == IPPROTO_UDP) {
|
||||
|
||||
#ifndef HAVE_DTLS_CLIENT_METHOD
|
||||
#ifdef OPENSSL_NO_DTLS
|
||||
if (o.ssl)
|
||||
bye("OpenSSL does not have DTLS support compiled in.");
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
#undef HAVE_OPENSSL
|
||||
#undef HAVE_DTLS_CLIENT_METHOD
|
||||
#undef HAVE_ALPN_SUPPORT
|
||||
|
||||
#undef HAVE_EPOLL
|
||||
|
||||
@@ -68,5 +68,4 @@
|
||||
#endif
|
||||
|
||||
#define HAVE_OPENSSL 1
|
||||
#define HAVE_DTLS_CLIENT_METHOD 1
|
||||
#endif /* NSOCK_WINCONFIG_H */
|
||||
|
||||
24
nsock/src/configure
vendored
24
nsock/src/configure
vendored
@@ -4916,30 +4916,6 @@ $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
|
||||
OPENSSL_LIBS="-lssl -lcrypto"
|
||||
LIBS_TMP="$LIBS"
|
||||
LIBS="$OPENSSL_LIBS $LIBS"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTLS_client_method" >&5
|
||||
$as_echo_n "checking for DTLS_client_method... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <openssl/ssl.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
DTLS_client_method()
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; };
|
||||
$as_echo "#define HAVE_DTLS_CLIENT_METHOD 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_set_alpn_protos" >&5
|
||||
$as_echo_n "checking for SSL_set_alpn_protos... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
|
||||
@@ -270,10 +270,6 @@ if test "$use_openssl" = "yes"; then
|
||||
OPENSSL_LIBS="-lssl -lcrypto"
|
||||
LIBS_TMP="$LIBS"
|
||||
LIBS="$OPENSSL_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for DTLS_client_method])
|
||||
AC_TRY_LINK([#include <openssl/ssl.h>], [DTLS_client_method()],
|
||||
[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_DTLS_CLIENT_METHOD, 1, [DTLS_client_method available])],
|
||||
[AC_MSG_RESULT([no])])
|
||||
AC_MSG_CHECKING([for SSL_set_alpn_protos])
|
||||
AC_TRY_LINK([#include <openssl/ssl.h>], [SSL_set_alpn_protos(NULL, NULL, 0)],
|
||||
[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_ALPN_SUPPORT, 1, [SSL ALPN protos support])],
|
||||
|
||||
@@ -199,7 +199,7 @@ struct npool {
|
||||
#if HAVE_OPENSSL
|
||||
/* The SSL Context (options and such) */
|
||||
SSL_CTX *sslctx;
|
||||
#ifdef HAVE_DTLS_CLIENT_METHOD
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
SSL_CTX *dtlsctx;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -95,13 +95,13 @@ void nsp_ssl_cleanup(struct npool *nsp)
|
||||
{
|
||||
if (nsp->sslctx != NULL)
|
||||
SSL_CTX_free(nsp->sslctx);
|
||||
#ifdef HAVE_DTLS_CLIENT_METHOD
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
if (nsp->dtlsctx != NULL)
|
||||
SSL_CTX_free(nsp->dtlsctx);
|
||||
#endif
|
||||
}
|
||||
nsp->sslctx = NULL;
|
||||
#ifdef HAVE_DTLS_CLIENT_METHOD
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
nsp->dtlsctx = NULL;
|
||||
#endif
|
||||
}
|
||||
@@ -198,7 +198,7 @@ nsock_ssl_ctx nsock_pool_ssl_init(nsock_pool ms_pool, int flags) {
|
||||
return nsock_pool_ssl_init_helper(ms->sslctx, flags);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DTLS_CLIENT_METHOD
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
|
||||
/* Create an SSL_CTX and do initialisation, creating a DTLS client */
|
||||
static SSL_CTX *dtls_init_common() {
|
||||
|
||||
Reference in New Issue
Block a user