diff options
author | cs <cs@FreeBSD.org> | 2015-09-16 07:59:08 +0800 |
---|---|---|
committer | cs <cs@FreeBSD.org> | 2015-09-16 07:59:08 +0800 |
commit | c6ad46aeef06253cdc2facb39fd8ab5c6048c54a (patch) | |
tree | a263b7ee2b9814011b67dfd7d08323cb64a4eda8 /security | |
parent | 02c6f2530d567c1c27ebc1581f4dc3e152472fbd (diff) | |
download | freebsd-ports-gnome-c6ad46aeef06253cdc2facb39fd8ab5c6048c54a.tar.gz freebsd-ports-gnome-c6ad46aeef06253cdc2facb39fd8ab5c6048c54a.tar.zst freebsd-ports-gnome-c6ad46aeef06253cdc2facb39fd8ab5c6048c54a.zip |
Fix build with LibreSSL
PR: 198992
Submitted by: brnrd@
Approved by: maintainer
Diffstat (limited to 'security')
-rw-r--r-- | security/nessus-libraries/Makefile | 6 | ||||
-rw-r--r-- | security/nessus-libraries/files/patch-Makefile | 12 | ||||
-rw-r--r-- | security/nessus-libraries/files/patch-libnessus_network.c (renamed from security/nessus-libraries/files/patch-libnessus__network.c) | 72 | ||||
-rw-r--r-- | security/nessus-libraries/files/patch-libpcap-nessus__configure | 6 |
4 files changed, 73 insertions, 23 deletions
diff --git a/security/nessus-libraries/Makefile b/security/nessus-libraries/Makefile index d15bdc7262a7..96c8b76be6d5 100644 --- a/security/nessus-libraries/Makefile +++ b/security/nessus-libraries/Makefile @@ -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> diff --git a/security/nessus-libraries/files/patch-Makefile b/security/nessus-libraries/files/patch-Makefile index 8c451b0d137e..a6999d3f3764 100644 --- a/security/nessus-libraries/files/patch-Makefile +++ b/security/nessus-libraries/files/patch-Makefile @@ -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 diff --git a/security/nessus-libraries/files/patch-libnessus__network.c b/security/nessus-libraries/files/patch-libnessus_network.c index a5aaf905d65f..ed5baea9eac7 100644 --- a/security/nessus-libraries/files/patch-libnessus__network.c +++ b/security/nessus-libraries/files/patch-libnessus_network.c @@ -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: + #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: -@@ -783,8 +787,10 @@ + 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: diff --git a/security/nessus-libraries/files/patch-libpcap-nessus__configure b/security/nessus-libraries/files/patch-libpcap-nessus__configure index d99314b84a2a..9512b3a844a7 100644 --- a/security/nessus-libraries/files/patch-libpcap-nessus__configure +++ b/security/nessus-libraries/files/patch-libpcap-nessus__configure @@ -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 |