1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-05 22:19:03 +00:00

Don't test for SSL_set_alpn_protos, present in all supported OpenSSL versions

This commit is contained in:
dmiller
2024-04-02 21:32:24 +00:00
parent 9fc9e6e081
commit 98c6ec85af
5 changed files with 0 additions and 42 deletions

View File

@@ -194,8 +194,6 @@ static void set_ssl_ctx_options(SSL_CTX *ctx)
bye("Unable to set OpenSSL cipher list: %s", ERR_error_string(ERR_get_error(), NULL));
}
#ifdef HAVE_ALPN_SUPPORT
if (o.sslalpn) {
size_t alpn_len;
unsigned char *alpn = next_protos_parse(&alpn_len, o.sslalpn);
@@ -215,8 +213,6 @@ static void set_ssl_ctx_options(SSL_CTX *ctx)
free(alpn);
}
#endif
}
#endif

View File

@@ -509,16 +509,10 @@ int main(int argc, char *argv[])
o.ssl = 1;
o.sslservername = Strdup(optarg);
}
#ifdef HAVE_ALPN_SUPPORT
else if (strcmp(long_options[option_index].name, "ssl-alpn") == 0) {
o.ssl = 1;
o.sslalpn = Strdup(optarg);
}
#else
else if (strcmp(long_options[option_index].name, "ssl-alpn") == 0) {
bye("OpenSSL does not have ALPN support compiled in. The --ssl-alpn option cannot be chosen.");
}
#endif
#else
else if (strcmp(long_options[option_index].name, "ssl-cert") == 0) {
bye("OpenSSL isn't compiled in. The --ssl-cert option cannot be chosen.");

View File

@@ -79,7 +79,6 @@
#undef HAVE_NETDB_H
#undef HAVE_OPENSSL
#undef HAVE_ALPN_SUPPORT
#undef HAVE_EPOLL
#undef HAVE_POLL

27
nsock/src/configure vendored
View File

@@ -4914,33 +4914,6 @@ if test "$use_openssl" = "yes"; then
$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_alpn_protos" >&5
$as_echo_n "checking for SSL_set_alpn_protos... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <openssl/ssl.h>
int
main ()
{
SSL_set_alpn_protos(NULL, NULL, 0)
;
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_ALPN_SUPPORT 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
LIBS="$LIBS_TMP"
fi

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_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])],
[AC_MSG_RESULT([no])])
LIBS="$LIBS_TMP"
fi