mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-05 06:27:37 +00:00
Fix build with LibreSSL
PR: 198992 Submitted by: brnrd@ Approved by: maintainer
This commit is contained in:
parent
822711e982
commit
e9306550e7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=397032
@ -27,8 +27,12 @@ CONFIGURE_ARGS+= --enable-bpf-sharing
|
||||
.endif
|
||||
USES= bison libtool
|
||||
USE_LDCONFIG= YES
|
||||
USE_OPENSSL= yes
|
||||
WRKSRC= ${WRKDIR}/nessus-libraries
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE}
|
||||
|
||||
.if ! defined(NESSUS_CLIENT_ONLY)
|
||||
pre-everything::
|
||||
@if [ ! -c /dev/bpf ]; then \
|
||||
@ -45,4 +49,4 @@ pre-everything::
|
||||
fi
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- Makefile.orig 2004-01-09 00:55:13.000000000 +0800
|
||||
+++ Makefile 2013-07-28 16:41:08.000000000 +0800
|
||||
@@ -3,8 +3,8 @@
|
||||
--- Makefile.orig 2004-01-08 16:55:13 UTC
|
||||
+++ Makefile
|
||||
@@ -3,8 +3,8 @@ include nessus.tmpl
|
||||
ALLDEPS = nessus.tmpl nessus-config
|
||||
|
||||
all: $(ALLDEPS) $(PCAP_MAKE)
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
nessus-config: nessus-config.pre Makefile nessus.tmpl
|
||||
@echo Creating $@ ...
|
||||
@@ -19,8 +19,8 @@
|
||||
@@ -19,8 +19,8 @@ nessus.tmpl: nessus.tmpl.in configure VE
|
||||
touch $@
|
||||
|
||||
win32:
|
||||
@ -22,7 +22,7 @@
|
||||
@echo
|
||||
@echo ' --------------------------------------------------------------'
|
||||
@echo ' The header files necessary and some docs have been generated,'
|
||||
@@ -31,27 +31,26 @@
|
||||
@@ -31,27 +31,26 @@ win32:
|
||||
|
||||
|
||||
pcap-make :
|
||||
@ -56,7 +56,7 @@
|
||||
$(INSTALL) -m 0444 include/libnessus.h $(DESTDIR)${includedir}/nessus
|
||||
$(INSTALL) -m 0444 include/harglists.h $(DESTDIR)${includedir}/nessus
|
||||
$(INSTALL) -m 0444 include/libvers.h $(DESTDIR)${includedir}/nessus
|
||||
@@ -64,22 +63,13 @@
|
||||
@@ -64,22 +63,13 @@ install : $(PCAP_INSTALL)
|
||||
test -d $(DESTDIR)${mandir}/man1 || ${INSTALL_DIR} -m 755 $(DESTDIR)${mandir}/man1
|
||||
$(INSTALL) -m 0644 nessus-config.1 $(DESTDIR)${mandir}/man1
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- libnessus/network.c.orig 2006-05-22 10:14:35.000000000 -0400
|
||||
+++ libnessus/network.c 2015-03-23 20:16:26.470964000 -0400
|
||||
@@ -532,9 +532,11 @@
|
||||
--- libnessus/network.c.orig 2006-05-22 14:14:35 UTC
|
||||
+++ libnessus/network.c
|
||||
@@ -532,12 +532,16 @@ open_SSL_connection(fp, timeout, cert, k
|
||||
|
||||
switch (fp->transport)
|
||||
{
|
||||
@ -9,10 +9,15 @@
|
||||
fp->ssl_mt = SSLv2_client_method();
|
||||
break;
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
case NESSUS_ENCAPS_SSLv3:
|
||||
fp->ssl_mt = SSLv3_client_method();
|
||||
break;
|
||||
@@ -724,7 +726,9 @@
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_TLSv1:
|
||||
fp->ssl_mt = TLSv1_client_method();
|
||||
break;
|
||||
@@ -724,9 +728,13 @@ open_stream_connection(args, port, trans
|
||||
{
|
||||
case NESSUS_ENCAPS_IP:
|
||||
#ifdef HAVE_SSL
|
||||
@ -20,20 +25,38 @@
|
||||
case NESSUS_ENCAPS_SSLv2:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_SSLv23:
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
case NESSUS_ENCAPS_SSLv3:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_TLSv1:
|
||||
@@ -783,8 +787,10 @@
|
||||
#endif
|
||||
break;
|
||||
@@ -763,7 +771,9 @@ open_stream_connection(args, port, trans
|
||||
break;
|
||||
#ifdef HAVE_SSL
|
||||
case NESSUS_ENCAPS_SSLv23:
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
case NESSUS_ENCAPS_SSLv3:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_TLSv1:
|
||||
renice_myself();
|
||||
cert = kb_item_get_str(plug_get_kb(args), "SSL/cert");
|
||||
@@ -782,12 +792,13 @@ open_stream_connection(args, port, trans
|
||||
sslerror(msg);
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
-
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
case NESSUS_ENCAPS_SSLv2:
|
||||
/* We do not need a client certificate in this case */
|
||||
+#endif
|
||||
|
||||
if (open_SSL_connection(fp, timeout, cert, key, passwd, cert_names) <= 0)
|
||||
goto failed;
|
||||
@@ -812,7 +818,9 @@
|
||||
+#endif
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
@@ -812,10 +823,14 @@ open_stream_connection_unknown_encaps5(a
|
||||
struct timeval tv1, tv2;
|
||||
static int encaps[] = {
|
||||
#ifdef HAVE_SSL
|
||||
@ -41,9 +64,14 @@
|
||||
NESSUS_ENCAPS_SSLv2,
|
||||
+#endif
|
||||
NESSUS_ENCAPS_TLSv1,
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
NESSUS_ENCAPS_SSLv3,
|
||||
#endif
|
||||
@@ -1044,7 +1052,9 @@
|
||||
+#endif
|
||||
NESSUS_ENCAPS_IP
|
||||
};
|
||||
|
||||
@@ -1044,9 +1059,13 @@ read_stream_connection_unbuffered(fd, bu
|
||||
{
|
||||
/* NESSUS_ENCAPS_IP was treated before with the non-Nessus fd */
|
||||
#ifdef HAVE_SSL
|
||||
@ -51,9 +79,13 @@
|
||||
case NESSUS_ENCAPS_SSLv2:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_SSLv23:
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
case NESSUS_ENCAPS_SSLv3:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_TLSv1:
|
||||
@@ -1280,7 +1290,9 @@
|
||||
# if DEBUG_SSL > 0
|
||||
if (getpid() != fp->pid)
|
||||
@@ -1280,9 +1299,13 @@ write_stream_connection4(fd, buf0, n, i_
|
||||
break;
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
@ -61,9 +93,13 @@
|
||||
case NESSUS_ENCAPS_SSLv2:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_SSLv23:
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
case NESSUS_ENCAPS_SSLv3:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_TLSv1:
|
||||
@@ -1504,8 +1516,10 @@
|
||||
FD_ZERO(&fdr); FD_ZERO(&fdw);
|
||||
FD_SET(fp->fd, & fdr); FD_SET(fp->fd, & fdw);
|
||||
@@ -1504,12 +1527,16 @@ get_encaps_name(code)
|
||||
{
|
||||
case NESSUS_ENCAPS_IP:
|
||||
return "IP";
|
||||
@ -73,8 +109,14 @@
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_SSLv23:
|
||||
return "SSLv23";
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
case NESSUS_ENCAPS_SSLv3:
|
||||
@@ -1527,7 +1541,9 @@
|
||||
return "SSLv3";
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_TLSv1:
|
||||
return "TLSv1";
|
||||
default:
|
||||
@@ -1527,9 +1554,13 @@ get_encaps_through(code)
|
||||
{
|
||||
case NESSUS_ENCAPS_IP:
|
||||
return "";
|
||||
@ -82,5 +124,9 @@
|
||||
case NESSUS_ENCAPS_SSLv2:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_SSLv23:
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
case NESSUS_ENCAPS_SSLv3:
|
||||
+#endif
|
||||
case NESSUS_ENCAPS_TLSv1:
|
||||
return " through SSL";
|
||||
default:
|
@ -1,6 +1,6 @@
|
||||
--- libpcap-nessus/configure.orig Mon Jul 31 11:09:51 2000
|
||||
+++ libpcap-nessus/configure Wed May 29 12:07:45 2002
|
||||
@@ -391,9 +391,9 @@
|
||||
--- libpcap-nessus/configure.orig 2003-02-06 20:28:07 UTC
|
||||
+++ libpcap-nessus/configure
|
||||
@@ -391,9 +391,9 @@ EOF
|
||||
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
|
||||
echo "configure: warning: $ac_option: invalid host type" 1>&2
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user