summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nmap/files')
-rw-r--r--net-analyzer/nmap/files/nmap-5.10_beta1-string.patch11
-rw-r--r--net-analyzer/nmap/files/nmap-5.21-python.patch21
-rw-r--r--net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch20
-rw-r--r--net-analyzer/nmap/files/nmap-6.46-uninstaller.patch19
-rw-r--r--net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch11
-rw-r--r--net-analyzer/nmap/files/nmap-7.25-libpcre.patch10
-rw-r--r--net-analyzer/nmap/files/nmap-7.31-libnl.patch15
-rw-r--r--net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch26
-rw-r--r--net-analyzer/nmap/files/nmap-7.91-no-FORTIFY_SOURCE.patch66
-rw-r--r--net-analyzer/nmap/files/nmap-7.93-openssl-1.1.patch287
-rw-r--r--net-analyzer/nmap/files/nmap-7.94-autoconf-2.72.patch33
-rw-r--r--net-analyzer/nmap/files/nmap-7.94-topport.patch31
-rw-r--r--net-analyzer/nmap/files/nmap-9999-netutil-else.patch11
13 files changed, 64 insertions, 497 deletions
diff --git a/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch b/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch
deleted file mode 100644
index df29db3782d5..000000000000
--- a/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- nmap-5.10BETA1/Target.h.org 2009-12-08 08:21:59.000000000 +0100
-+++ nmap-5.10BETA1/Target.h 2009-12-08 08:22:02.000000000 +0100
-@@ -99,6 +99,8 @@
-
- #ifndef NOLUA
- #include "nse_main.h"
-+#else
-+#include <string>
- #endif
-
- #include "portreasons.h"
diff --git a/net-analyzer/nmap/files/nmap-5.21-python.patch b/net-analyzer/nmap/files/nmap-5.21-python.patch
deleted file mode 100644
index aa0d4f9db953..000000000000
--- a/net-analyzer/nmap/files/nmap-5.21-python.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Naurp nmap-5.21-orig/Makefile.in nmap-5.21/Makefile.in
---- nmap-5.21-orig/Makefile.in 2010-01-31 09:53:53.000000000 +0100
-+++ nmap-5.21/Makefile.in 2010-01-31 09:54:48.000000000 +0100
-@@ -253,7 +253,7 @@ build-zenmap: $(ZENMAPDIR)/setup.py $(ZE
-
- install-zenmap: $(ZENMAPDIR)/setup.py
- $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
-- cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)")
-+ cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile
- $(INSTALL) -c -m 644 docs/zenmap.1 $(DESTDIR)$(mandir)/man1/
- # Create a symlink from nmapfe to zenmap if nmapfe doesn't exist or is
- # already a link.
-@@ -267,7 +267,7 @@ build-ndiff:
- cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)")
-
- install-ndiff:
-- cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)")
-+ cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile
-
- NSE_FILES = scripts/script.db scripts/*.nse
- NSE_LIB_LUA_FILES = nselib/*.lua
diff --git a/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch b/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch
deleted file mode 100644
index 5aa9fa7f631c..000000000000
--- a/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/liblua/Makefile
-+++ b/liblua/Makefile
-@@ -11,7 +11,7 @@
- LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
- LIBS= -lm $(SYSLIBS) $(MYLIBS)
-
--AR= ar rcu
-+AR= ar
- RANLIB= ranlib
- RM= rm -f
-
-@@ -56,7 +56,7 @@
- a: $(ALL_A)
-
- $(LUA_A): $(BASE_O)
-- $(AR) $@ $(BASE_O)
-+ $(AR) rcu $@ $(BASE_O)
- $(RANLIB) $@
-
- $(LUA_T): $(LUA_O) $(LUA_A)
diff --git a/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch b/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch
deleted file mode 100644
index 6b43f8f5a069..000000000000
--- a/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/zenmap/setup.py
-+++ b/zenmap/setup.py
-@@ -245,7 +245,6 @@
- self.set_perms()
- self.set_modules_path()
- self.fix_paths()
-- self.create_uninstaller()
- self.write_installed_files()
-
- def get_installed_files(self):
-@@ -263,8 +262,6 @@
- os.path.join(self.install_data, data_dir)):
- for dir in dirs:
- installed_files.append(os.path.join(dirpath, dir))
-- installed_files.append(
-- os.path.join(self.install_scripts, "uninstall_" + APP_NAME))
- return installed_files
-
- def create_uninstaller(self):
diff --git a/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch b/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch
deleted file mode 100644
index 91caad1a6734..000000000000
--- a/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -477,7 +477,7 @@
- ./docs/style/lua-format -i scripts/*.nse
-
- makefile.dep:
-- $(CXX) -MM $(CPPFLAGS) $(SRCS) > $@
-+ $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $(SRCS) > $@
- -include makefile.dep
-
- # These the old names of scripts that have been renamed or deleted. Any
diff --git a/net-analyzer/nmap/files/nmap-7.25-libpcre.patch b/net-analyzer/nmap/files/nmap-7.25-libpcre.patch
deleted file mode 100644
index 9296dab7da7b..000000000000
--- a/net-analyzer/nmap/files/nmap-7.25-libpcre.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -522,7 +522,6 @@
-
- # If we still don't have it, we use our own
- if test $have_pcre != yes ; then
-- AC_CONFIG_SUBDIRS( libpcre )
- CPPFLAGS="-I\$(top_srcdir)/$LIBPCREDIR $CPPFLAGS"
- LIBPCRE_LIBS="$LIBPCREDIR/libpcre.a"
- PCRE_BUILD="build-pcre"
diff --git a/net-analyzer/nmap/files/nmap-7.31-libnl.patch b/net-analyzer/nmap/files/nmap-7.31-libnl.patch
deleted file mode 100644
index c16d8291ea3b..000000000000
--- a/net-analyzer/nmap/files/nmap-7.31-libnl.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-nping does not call anything nl_* related so it should not link against libnl (bug #529244)
-Patching configure.ac would be best but eautoreconf does not handle the subdirs very well.
-
---- a/nping/configure.ac
-+++ b/nping/configure.ac
-@@ -114,9 +114,6 @@
- # OpenSSL and NSE C modules can require dlopen
- AC_SEARCH_LIBS(dlopen, dl)
-
--# libpcap can require libnl
--AC_SEARCH_LIBS(nl_handle_alloc, nl)
--
- # We test whether they specified openssl desires explicitly
- use_openssl="yes"
- specialssldir=""
diff --git a/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch b/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch
deleted file mode 100644
index 583f7f1d1aa3..000000000000
--- a/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -468,7 +468,6 @@
- fi
-
- if test $have_libpcap != yes; then
-- AC_CONFIG_SUBDIRS(libpcap)
- if test "${LIBPCAP_INC+set}" = "set"; then
- CPPFLAGS="$CPPFLAGS -I$LIBPCAP_INC"
- else
-@@ -611,7 +610,6 @@
- fi
-
- if test $have_libz != yes; then
-- AC_CONFIG_SUBDIRS(libz)
- # TODO: This doesn't work because libssh2's configure script is looking for
- # already-built libs. Giving up for now: build libz first or install
- # headers/libs on your own if you want compression support for SSH.
-@@ -697,7 +695,6 @@
- # If we still don't have it, we use our own
- if test $have_libssh2 != yes; then
- have_libssh2=yes
-- AC_CONFIG_SUBDIRS(libssh2)
- CPPFLAGS="-I\$(top_srcdir)/$LIBSSH2DIR/include $CPPFLAGS"
- LIBSSH2_LIBS="$LIBSSH2DIR/lib/libssh2.a"
- LIBSSH2_BUILD="build-libssh2"
diff --git a/net-analyzer/nmap/files/nmap-7.91-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-7.91-no-FORTIFY_SOURCE.patch
deleted file mode 100644
index b4c06be942ed..000000000000
--- a/net-analyzer/nmap/files/nmap-7.91-no-FORTIFY_SOURCE.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- a/nbase/Makefile.in
-+++ b/nbase/Makefile.in
-@@ -12,7 +12,7 @@
- CCOPT =
- DEFS = @DEFS@
- # With GCC, add extra security checks to source code.
--DEFS += -D_FORTIFY_SOURCE=2
-+DEFS +=
- CPPFLAGS = @CPPFLAGS@
- CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS)
- STATIC =
---- a/ncat/Makefile.in
-+++ b/ncat/Makefile.in
-@@ -53,7 +53,7 @@
- LIBS = @LIBS@
- DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\""
- # With GCC, add extra security checks to source code.
--DEFS += -D_FORTIFY_SOURCE=2
-+DEFS +=
- INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR)
- RM = rm -f
- STRIP = @STRIP@
---- a/nsock/src/Makefile.in
-+++ b/nsock/src/Makefile.in
-@@ -13,7 +13,7 @@
- CCOPT =
- DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\"
- # With GCC, add extra security checks to source code.
--DEFS += -D_FORTIFY_SOURCE=2
-+DEFS +=
- INCLS = -I../include
- CFLAGS = @CFLAGS@ $(CCOPT)
- # CFLAGS = -g -Wall $(DEFS) $(INCLS)
---- a/libnetutil/Makefile.in
-+++ b/libnetutil/Makefile.in
-@@ -5,7 +5,7 @@
- CXXFLAGS = @CXXFLAGS@
- CPPFLAGS = @CPPFLAGS@ $(DEFS)
- DEFS = @DEFS@
--DEFS += -D_FORTIFY_SOURCE=2
-+DEFS +=
- AR = ar
- RANLIB = @RANLIB@
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -41,7 +41,7 @@
- # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
- # Level 1 only makes changes that don't affect "conforming" programs,
- # while level 2 enforces additional restrictions.
--DEFS += -D_FORTIFY_SOURCE=2
-+DEFS +=
- # For mtrace debugging -- see MTRACE define in main.cc for instructions
- # Should only be enabled during debugging and not in any real release.
- # DEFS += -DMTRACE=1
---- a/nping/Makefile.in
-+++ b/nping/Makefile.in
-@@ -38,7 +38,7 @@
- # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
- # Level 1 only makes changes that don't affect "conforming" programs,
- # while level 2 enforces additional restrictions.
--DEFS += -D_FORTIFY_SOURCE=2
-+DEFS +=
- # For mtrace debugging -- see MTRACE define in main.cc for instructions
- # Should only be enabled during debugging and not in any real release.
- # DEFS += -DMTRACE=1
diff --git a/net-analyzer/nmap/files/nmap-7.93-openssl-1.1.patch b/net-analyzer/nmap/files/nmap-7.93-openssl-1.1.patch
deleted file mode 100644
index 211cc2dbb7f7..000000000000
--- a/net-analyzer/nmap/files/nmap-7.93-openssl-1.1.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-https://github.com/nmap/nmap/commit/d6bea8dcdee36a3902cece14097993350306f1b6
-https://github.com/nmap/nmap/issues/2516
-https://bugs.gentoo.org/868483
-
-From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
-Date: Tue, 6 Sep 2022 22:39:34 +0000
-Subject: [PATCH] Build based on OpenSSL version, not API level. Fixes #2516
-
---- a/ncat/http_digest.c
-+++ b/ncat/http_digest.c
-@@ -133,7 +133,7 @@ int http_digest_init_secret(void)
- return 0;
- }
-
--#if OPENSSL_API_LEVEL < 10100
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- #define EVP_MD_CTX_new EVP_MD_CTX_create
- #define EVP_MD_CTX_free EVP_MD_CTX_destroy
- #endif
---- a/ncat/ncat_connect.c
-+++ b/ncat/ncat_connect.c
-@@ -82,8 +82,8 @@
- #include <openssl/err.h>
-
- /* Deprecated in OpenSSL 3.0 */
--#if OPENSSL_API_LEVEL >= 30000
--#define SSL_get_peer_certificate SSL_get1_peer_certificate
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
-+# define SSL_get_peer_certificate SSL_get1_peer_certificate
- #endif
- #endif
-
---- a/ncat/ncat_ssl.c
-+++ b/ncat/ncat_ssl.c
-@@ -80,7 +80,7 @@
- #define FUNC_ASN1_STRING_data ASN1_STRING_data
- #endif
-
--#if OPENSSL_API_LEVEL >= 30000
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
- #include <openssl/provider.h>
- /* Deprecated in OpenSSL 3.0 */
- #define SSL_get_peer_certificate SSL_get1_peer_certificate
-@@ -117,7 +117,7 @@ SSL_CTX *setup_ssl_listen(void)
- OpenSSL_add_all_algorithms();
- ERR_load_crypto_strings();
- SSL_load_error_strings();
--#elif OPENSSL_API_LEVEL >= 30000
-+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
- if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
- {
- loguser("OpenSSL legacy provider failed to load.\n");
-@@ -477,7 +477,7 @@ static int ssl_gen_cert(X509 **cert, EVP_PKEY **key)
- const char *commonName = "localhost";
- char dNSName[128];
- int rc;
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- int ret = 0;
- RSA *rsa = NULL;
- BIGNUM *bne = NULL;
---- a/ncat/ncat_ssl.h
-+++ b/ncat/ncat_ssl.h
-@@ -67,18 +67,6 @@
- #include <openssl/ssl.h>
- #include <openssl/err.h>
-
--/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
--#ifndef OPENSSL_API_LEVEL
--# if OPENSSL_API_COMPAT < 0x900000L
--# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
--# else
--# define OPENSSL_API_LEVEL \
-- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
-- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
-- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
--# endif
--#endif
--
- #define NCAT_CA_CERTS_FILE "ca-bundle.crt"
-
- enum {
---- a/ncat/test/test-wildcard.c
-+++ b/ncat/test/test-wildcard.c
-@@ -20,7 +20,7 @@ are rejected. The SSL transactions happen over OpenSSL BIO pairs.
-
- #include "ncat_core.h"
- #include "ncat_ssl.h"
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- #include <openssl/bn.h>
- #endif
-
-@@ -294,7 +294,7 @@ static int set_dNSNames(X509 *cert, const struct lstr dNSNames[])
- static int gen_cert(X509 **cert, EVP_PKEY **key,
- const struct lstr commonNames[], const struct lstr dNSNames[])
- {
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- int rc, ret=0;
- RSA *rsa = NULL;
- BIGNUM *bne = NULL;
---- a/nse_openssl.cc
-+++ b/nse_openssl.cc
-@@ -20,6 +20,9 @@
- #define FUNC_EVP_CIPHER_CTX_init EVP_CIPHER_CTX_reset
- #define FUNC_EVP_CIPHER_CTX_cleanup EVP_CIPHER_CTX_reset
- #define PASS_EVP_CTX(ctx) (ctx)
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
-+# include <openssl/provider.h>
-+#endif
- #else
- #define FUNC_EVP_MD_CTX_init EVP_MD_CTX_init
- #define FUNC_EVP_MD_CTX_cleanup EVP_MD_CTX_cleanup
-@@ -37,23 +40,6 @@ extern NmapOps o;
-
- #include "nse_openssl.h"
-
--/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
--#ifndef OPENSSL_API_LEVEL
--# if OPENSSL_API_COMPAT < 0x900000L
--# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
--# else
--# define OPENSSL_API_LEVEL \
-- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
-- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
-- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
--# endif
--#endif
--
--
--#if OPENSSL_API_LEVEL >= 30000
--#include <openssl/provider.h>
--#endif
--
- #define NSE_SSL_LUA_ERR(_L) \
- luaL_error(_L, "OpenSSL error: %s", ERR_error_string(ERR_get_error(), NULL))
-
-@@ -184,7 +170,7 @@ static int l_bignum_is_prime( lua_State *L ) /** bignum_is_prime( BIGNUM p ) */
- bignum_data_t * p = (bignum_data_t *) luaL_checkudata( L, 1, "BIGNUM" );
- BN_CTX * ctx = BN_CTX_new();
- int is_prime =
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- BN_is_prime_ex( p->bn, BN_prime_checks, ctx, NULL );
- #else
- BN_check_prime( p->bn, ctx, NULL );
-@@ -199,7 +185,7 @@ static int l_bignum_is_safe_prime( lua_State *L ) /** bignum_is_safe_prime( BIGN
- bignum_data_t * p = (bignum_data_t *) luaL_checkudata( L, 1, "BIGNUM" );
- BN_CTX * ctx = BN_CTX_new();
- int is_prime =
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- BN_is_prime_ex( p->bn, BN_prime_checks, ctx, NULL );
- #else
- BN_check_prime( p->bn, ctx, NULL );
-@@ -210,7 +196,7 @@ static int l_bignum_is_safe_prime( lua_State *L ) /** bignum_is_safe_prime( BIGN
- BN_sub_word( n, (BN_ULONG)1 );
- BN_div_word( n, (BN_ULONG)2 );
- is_safe =
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- BN_is_prime_ex( n, BN_prime_checks, ctx, NULL );
- #else
- BN_check_prime( n, ctx, NULL );
-@@ -582,7 +568,7 @@ LUALIB_API int luaopen_openssl(lua_State *L) {
- #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
- OpenSSL_add_all_algorithms();
- ERR_load_crypto_strings();
--#elif OPENSSL_API_LEVEL >= 30000
-+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
- if (NULL == OSSL_PROVIDER_load(NULL, "legacy") && o.debugging > 1)
- {
- // Legacy provider may not be available.
---- a/nse_ssl_cert.cc
-+++ b/nse_ssl_cert.cc
-@@ -89,19 +89,7 @@
- #define X509_get0_notAfter X509_get_notAfter
- #endif
-
--/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
--#ifndef OPENSSL_API_LEVEL
--# if OPENSSL_API_COMPAT < 0x900000L
--# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
--# else
--# define OPENSSL_API_LEVEL \
-- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
-- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
-- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
--# endif
--#endif
--
--#if OPENSSL_API_LEVEL >= 30000
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
- #include <openssl/core_names.h>
- /* Deprecated in OpenSSL 3.0 */
- #define SSL_get_peer_certificate SSL_get1_peer_certificate
-@@ -459,7 +447,7 @@ static const char *pkey_type_to_string(int type)
- }
-
- int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey) {
--#if OPENSSL_API_LEVEL >= 30000
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
- char tmp[64] = {0};
- size_t len = 0;
- /* This structure (ecdhparams.curve_params) comes from tls.lua */
-@@ -634,7 +622,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
- else
- #endif
- if (pkey_type == EVP_PKEY_RSA) {
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- RSA *rsa = EVP_PKEY_get1_RSA(pubkey);
- if (rsa) {
- #endif
-@@ -643,7 +631,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
- luaL_getmetatable( L, "BIGNUM" );
- lua_setmetatable( L, -2 );
- #if HAVE_OPAQUE_STRUCTS
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- const BIGNUM *n = NULL, *e = NULL;
- data->should_free = false;
- RSA_get0_key(rsa, &n, &e, NULL);
-@@ -663,7 +651,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
- luaL_getmetatable( L, "BIGNUM" );
- lua_setmetatable( L, -2 );
- #if HAVE_OPAQUE_STRUCTS
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- data->should_free = false;
- #else
- data->should_free = true;
-@@ -673,7 +661,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
- data->bn = rsa->n;
- #endif
- lua_setfield(L, -2, "modulus");
--#if OPENSSL_API_LEVEL < 30000
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
- RSA_free(rsa);
- }
- #endif
---- a/nsock/src/nsock_ssl.c
-+++ b/nsock/src/nsock_ssl.c
-@@ -64,7 +64,7 @@
- #include "netutils.h"
-
- #if HAVE_OPENSSL
--#if OPENSSL_API_LEVEL >= 30000
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
- #include <openssl/provider.h>
- #endif
-
-@@ -120,7 +120,7 @@ static SSL_CTX *ssl_init_helper(const SSL_METHOD *method) {
- SSL_library_init();
- #else
- OPENSSL_atexit(nsock_ssl_atexit);
--#if OPENSSL_API_LEVEL >= 30000
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
- if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
- {
- nsock_log_error("OpenSSL legacy provider failed to load.\n");
---- a/nsock/src/nsock_ssl.h
-+++ b/nsock/src/nsock_ssl.h
-@@ -69,20 +69,7 @@
- #include <openssl/err.h>
- #include <openssl/rand.h>
-
--/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
--#ifndef OPENSSL_API_LEVEL
--# if OPENSSL_API_COMPAT < 0x900000L
--# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
--# else
--# define OPENSSL_API_LEVEL \
-- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
-- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
-- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
--# endif
--#endif
--
--
--#if OPENSSL_API_LEVEL >= 30000
-+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
- /* Deprecated in OpenSSL 3.0 */
- #define SSL_get_peer_certificate SSL_get1_peer_certificate
- #endif
-
diff --git a/net-analyzer/nmap/files/nmap-7.94-autoconf-2.72.patch b/net-analyzer/nmap/files/nmap-7.94-autoconf-2.72.patch
new file mode 100644
index 000000000000..bf6affb516d0
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-7.94-autoconf-2.72.patch
@@ -0,0 +1,33 @@
+https://github.com/nmap/nmap/pull/2763
+https://bugs.gentoo.org/920712
+--- a/libdnet-stripped/config/acinclude.m4
++++ b/libdnet-stripped/config/acinclude.m4
+@@ -201,6 +201,8 @@
+ dnl
+ AC_DEFUN(AC_DNET_IOCTL_ARP,
+ [AC_MSG_CHECKING(for arp(7) ioctls)
++ AC_PROG_EGREP
++ AC_PROG_CPP
+ AC_CACHE_VAL(ac_cv_dnet_ioctl_arp,
+ AC_EGREP_CPP(werd, [
+ # include <sys/types.h>
+--- a/libdnet-stripped/configure.in
++++ b/libdnet-stripped/configure.in
+@@ -211,7 +211,7 @@
+ AC_REPLACE_FUNCS(err strlcpy strsep)
+
+ dnl Checks for other system-specific jonks.
+-if test "$CYGWIN" != yes ; then
++AS_IF([test "$CYGWIN" != yes], [
+ AC_DNET_BSD_BPF
+ AC_DNET_LINUX_PROCFS
+ AC_DNET_LINUX_PF_PACKET
+@@ -221,7 +221,7 @@
+ AC_DNET_RAWIP_HOST_OFFLEN
+ AC_DNET_RAWIP_COOKED
+ AC_DNET_GETKERNINFO
+-fi
++])
+
+ dnl Check for arp interface.
+ if test "$ac_cv_header_Iphlpapi_h" = yes ; then
diff --git a/net-analyzer/nmap/files/nmap-7.94-topport.patch b/net-analyzer/nmap/files/nmap-7.94-topport.patch
new file mode 100644
index 000000000000..0ba568d317e3
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-7.94-topport.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/918874
+https://github.com/nmap/nmap/issues/2655
+https://github.com/nmap/nmap/issues/2679
+https://github.com/nmap/nmap/commit/edad9c059ca45bccab8c0f41fe6fc6546c60153a
+
+From edad9c059ca45bccab8c0f41fe6fc6546c60153a Mon Sep 17 00:00:00 2001
+From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
+Date: Thu, 20 Jul 2023 16:21:23 +0000
+Subject: [PATCH] Add missing braces. Fixes #2679
+
+---
+ services.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/services.cc b/services.cc
+index a0899c7509..2a709dca97 100644
+--- a/services.cc
++++ b/services.cc
+@@ -496,9 +496,10 @@ void gettoppts(double level, const char *portlist, struct scan_lists * ports, co
+ if (sctpmax && strcmp(current->s_proto, "sctp") == 0
+ && (!ptsdata_initialized ||
+ is_port_member(ptsdata.sctp_ports, ptsdata.sctp_count, current))
+- )
++ ) {
+ ports->sctp_ports[ports->sctp_count++] = current->s_port;
+- sctpmax--;
++ sctpmax--;
++ }
+ break;
+ default:
+ break;
diff --git a/net-analyzer/nmap/files/nmap-9999-netutil-else.patch b/net-analyzer/nmap/files/nmap-9999-netutil-else.patch
deleted file mode 100644
index c9b3350d9865..000000000000
--- a/net-analyzer/nmap/files/nmap-9999-netutil-else.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libnetutil/netutil.cc
-+++ b/libnetutil/netutil.cc
-@@ -2571,7 +2571,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
-
- /* CASE 4: where we (finally!) have a full 20 byte TCP header so we can
- * safely print all fields */
-- else { /* if (datalen >= 20) */
-+ else if (datalen >= 20) {
-
- /* TCP Flags */
- p = tflags;