1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Avoid checking for SSL_set_tlsext_host_name, present in all supported OpenSSL versions

This commit is contained in:
dmiller
2024-04-02 21:32:22 +00:00
parent ed5fb3e248
commit c1c9fcca4a
8 changed files with 0 additions and 35 deletions

View File

@@ -61,7 +61,6 @@
isn't available to create config.h. */
#define HAVE_OPENSSL 1
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
#define HAVE_HTTP_DIGEST 1
#define LUA_INCLUDED 1
#define HAVE_LUA 1

View File

@@ -71,7 +71,6 @@
#define NMAP_PLATFORM "i686-pc-windows-windows"
#define HAVE_OPENSSL 1
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
#define HAVE_LIBSSH2 1
#define HAVE_LIBZ 1
/* Since MSVC 2010, stdint.h is included as part of C99 compatibility */

View File

@@ -81,7 +81,6 @@
#define NPING_PLATFORM "i686-pc-windows-windows"
#define HAVE_OPENSSL 1
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
/* Apparently __func__ isn't yet supported */
#define __func__ __FUNCTION__
typedef unsigned __int32 u_int32_t;

View File

@@ -79,7 +79,6 @@
#undef HAVE_NETDB_H
#undef HAVE_OPENSSL
#undef HAVE_SSL_SET_TLSEXT_HOST_NAME
#undef HAVE_DTLS_CLIENT_METHOD
#undef HAVE_ALPN_SUPPORT

View File

@@ -69,5 +69,4 @@
#define HAVE_OPENSSL 1
#define HAVE_DTLS_CLIENT_METHOD 1
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
#endif /* NSOCK_WINCONFIG_H */

24
nsock/src/configure vendored
View File

@@ -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 SSL_set_tlsext_host_name" >&5
$as_echo_n "checking for SSL_set_tlsext_host_name... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <openssl/ssl.h>
int
main ()
{
SSL_set_tlsext_host_name(NULL, NULL)
;
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_SSL_SET_TLSEXT_HOST_NAME 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 DTLS_client_method" >&5
$as_echo_n "checking for DTLS_client_method... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext

View File

@@ -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 SSL_set_tlsext_host_name])
AC_TRY_LINK([#include <openssl/ssl.h>], [SSL_set_tlsext_host_name(NULL, NULL)],
[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_SSL_SET_TLSEXT_HOST_NAME, 1, [SSL_set_tlsext_host_name available])],
[AC_MSG_RESULT([no])])
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])],

View File

@@ -374,14 +374,12 @@ void handle_connect_result(struct npool *ms, struct nevent *nse, enum nse_status
fatal("SSL_new failed: %s", ERR_error_string(ERR_get_error(), NULL));
}
#if HAVE_SSL_SET_TLSEXT_HOST_NAME
/* Avoid sending SNI extension with DTLS because many servers don't allow
* fragmented ClientHello messages. */
if (iod->hostname != NULL && iod->lastproto != IPPROTO_UDP) {
if (SSL_set_tlsext_host_name(iod->ssl, iod->hostname) != 1)
fatal("SSL_set_tlsext_host_name failed: %s", ERR_error_string(ERR_get_error(), NULL));
}
#endif
/* Associate our new SSL with the connected socket. It will inherit the
* non-blocking nature of the sd */