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:
@@ -61,7 +61,6 @@
|
|||||||
isn't available to create config.h. */
|
isn't available to create config.h. */
|
||||||
|
|
||||||
#define HAVE_OPENSSL 1
|
#define HAVE_OPENSSL 1
|
||||||
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
|
|
||||||
#define HAVE_HTTP_DIGEST 1
|
#define HAVE_HTTP_DIGEST 1
|
||||||
#define LUA_INCLUDED 1
|
#define LUA_INCLUDED 1
|
||||||
#define HAVE_LUA 1
|
#define HAVE_LUA 1
|
||||||
|
|||||||
@@ -71,7 +71,6 @@
|
|||||||
#define NMAP_PLATFORM "i686-pc-windows-windows"
|
#define NMAP_PLATFORM "i686-pc-windows-windows"
|
||||||
|
|
||||||
#define HAVE_OPENSSL 1
|
#define HAVE_OPENSSL 1
|
||||||
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
|
|
||||||
#define HAVE_LIBSSH2 1
|
#define HAVE_LIBSSH2 1
|
||||||
#define HAVE_LIBZ 1
|
#define HAVE_LIBZ 1
|
||||||
/* Since MSVC 2010, stdint.h is included as part of C99 compatibility */
|
/* Since MSVC 2010, stdint.h is included as part of C99 compatibility */
|
||||||
|
|||||||
@@ -81,7 +81,6 @@
|
|||||||
#define NPING_PLATFORM "i686-pc-windows-windows"
|
#define NPING_PLATFORM "i686-pc-windows-windows"
|
||||||
|
|
||||||
#define HAVE_OPENSSL 1
|
#define HAVE_OPENSSL 1
|
||||||
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
|
|
||||||
/* Apparently __func__ isn't yet supported */
|
/* Apparently __func__ isn't yet supported */
|
||||||
#define __func__ __FUNCTION__
|
#define __func__ __FUNCTION__
|
||||||
typedef unsigned __int32 u_int32_t;
|
typedef unsigned __int32 u_int32_t;
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
#undef HAVE_NETDB_H
|
#undef HAVE_NETDB_H
|
||||||
|
|
||||||
#undef HAVE_OPENSSL
|
#undef HAVE_OPENSSL
|
||||||
#undef HAVE_SSL_SET_TLSEXT_HOST_NAME
|
|
||||||
#undef HAVE_DTLS_CLIENT_METHOD
|
#undef HAVE_DTLS_CLIENT_METHOD
|
||||||
#undef HAVE_ALPN_SUPPORT
|
#undef HAVE_ALPN_SUPPORT
|
||||||
|
|
||||||
|
|||||||
@@ -69,5 +69,4 @@
|
|||||||
|
|
||||||
#define HAVE_OPENSSL 1
|
#define HAVE_OPENSSL 1
|
||||||
#define HAVE_DTLS_CLIENT_METHOD 1
|
#define HAVE_DTLS_CLIENT_METHOD 1
|
||||||
#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1
|
|
||||||
#endif /* NSOCK_WINCONFIG_H */
|
#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"
|
OPENSSL_LIBS="-lssl -lcrypto"
|
||||||
LIBS_TMP="$LIBS"
|
LIBS_TMP="$LIBS"
|
||||||
LIBS="$OPENSSL_LIBS $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 "$as_me:${as_lineno-$LINENO}: checking for DTLS_client_method" >&5
|
||||||
$as_echo_n "checking for DTLS_client_method... " >&6; }
|
$as_echo_n "checking for DTLS_client_method... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
|||||||
@@ -270,10 +270,6 @@ if test "$use_openssl" = "yes"; then
|
|||||||
OPENSSL_LIBS="-lssl -lcrypto"
|
OPENSSL_LIBS="-lssl -lcrypto"
|
||||||
LIBS_TMP="$LIBS"
|
LIBS_TMP="$LIBS"
|
||||||
LIBS="$OPENSSL_LIBS $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_MSG_CHECKING([for DTLS_client_method])
|
||||||
AC_TRY_LINK([#include <openssl/ssl.h>], [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([yes]); AC_DEFINE(HAVE_DTLS_CLIENT_METHOD, 1, [DTLS_client_method available])],
|
||||||
|
|||||||
@@ -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));
|
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
|
/* Avoid sending SNI extension with DTLS because many servers don't allow
|
||||||
* fragmented ClientHello messages. */
|
* fragmented ClientHello messages. */
|
||||||
if (iod->hostname != NULL && iod->lastproto != IPPROTO_UDP) {
|
if (iod->hostname != NULL && iod->lastproto != IPPROTO_UDP) {
|
||||||
if (SSL_set_tlsext_host_name(iod->ssl, iod->hostname) != 1)
|
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));
|
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
|
/* Associate our new SSL with the connected socket. It will inherit the
|
||||||
* non-blocking nature of the sd */
|
* non-blocking nature of the sd */
|
||||||
|
|||||||
Reference in New Issue
Block a user