Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Sep 2015 23:59:09 +0000 (UTC)
From:      Carlo Strub <cs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r397032 - in head/security/nessus-libraries: . files
Message-ID:  <201509152359.t8FNx9g1065178@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cs
Date: Tue Sep 15 23:59:08 2015
New Revision: 397032
URL: https://svnweb.freebsd.org/changeset/ports/397032

Log:
  Fix build with LibreSSL
  
  PR:		198992
  Submitted by:	brnrd@
  Approved by:	maintainer

Added:
  head/security/nessus-libraries/files/patch-libnessus_network.c   (contents, props changed)
Deleted:
  head/security/nessus-libraries/files/patch-libnessus__network.c
Modified:
  head/security/nessus-libraries/Makefile
  head/security/nessus-libraries/files/patch-Makefile
  head/security/nessus-libraries/files/patch-libpcap-nessus__configure

Modified: head/security/nessus-libraries/Makefile
==============================================================================
--- head/security/nessus-libraries/Makefile	Tue Sep 15 23:57:28 2015	(r397031)
+++ head/security/nessus-libraries/Makefile	Tue Sep 15 23:59:08 2015	(r397032)
@@ -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>

Modified: head/security/nessus-libraries/files/patch-Makefile
==============================================================================
--- head/security/nessus-libraries/files/patch-Makefile	Tue Sep 15 23:57:28 2015	(r397031)
+++ head/security/nessus-libraries/files/patch-Makefile	Tue Sep 15 23:59:08 2015	(r397032)
@@ -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
  

Added: head/security/nessus-libraries/files/patch-libnessus_network.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/nessus-libraries/files/patch-libnessus_network.c	Tue Sep 15 23:59:08 2015	(r397032)
@@ -0,0 +1,132 @@
+--- 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)
+     {
++#ifndef OPENSSL_NO_SSL2
+     case NESSUS_ENCAPS_SSLv2:
+       fp->ssl_mt = SSLv2_client_method();
+       break;
++#endif
++#ifndef OPENSSL_NO_SSL3
+     case NESSUS_ENCAPS_SSLv3:
+       fp->ssl_mt = SSLv3_client_method();
+       break;
++#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
++#ifndef OPENSSL_NO_SSL2
+   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:
+     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   
+   case NESSUS_ENCAPS_SSLv2:
+     /* We do not need a client certificate in this case */
+ 
+     if (open_SSL_connection(fp, timeout, cert, key, passwd, cert_names) <= 0)
+     goto failed;
++#endif
+   break;
+ #endif
+  }
+@@ -812,10 +823,14 @@ open_stream_connection_unknown_encaps5(a
+   struct timeval	tv1, tv2;
+  static int encaps[] = {
+ #ifdef HAVE_SSL
++#ifndef OPENSSL_NO_SSL2
+    NESSUS_ENCAPS_SSLv2,
++#endif
+    NESSUS_ENCAPS_TLSv1,
++#ifndef OPENSSL_NO_SSL3
+    NESSUS_ENCAPS_SSLv3,
+ #endif
++#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
++#ifndef OPENSSL_NO_SSL2
+     case NESSUS_ENCAPS_SSLv2:
++#endif
+     case NESSUS_ENCAPS_SSLv23:
++#ifndef OPENSSL_NO_SSL3
+     case NESSUS_ENCAPS_SSLv3:
++#endif
+     case NESSUS_ENCAPS_TLSv1:
+ # if DEBUG_SSL > 0
+       if (getpid() != fp->pid)
+@@ -1280,9 +1299,13 @@ write_stream_connection4(fd, buf0, n, i_
+     break;
+ 
+ #ifdef HAVE_SSL
++#ifndef OPENSSL_NO_SSL2
+   case NESSUS_ENCAPS_SSLv2:
++#endif
+   case NESSUS_ENCAPS_SSLv23:
++#ifndef OPENSSL_NO_SSL3
+   case NESSUS_ENCAPS_SSLv3:
++#endif
+   case NESSUS_ENCAPS_TLSv1:
+       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";
++#ifndef OPENSSL_NO_SSL2
+   case NESSUS_ENCAPS_SSLv2:
+     return "SSLv2";
++#endif
+   case NESSUS_ENCAPS_SSLv23:
+     return "SSLv23";
++#ifndef OPENSSL_NO_SSL3
+   case NESSUS_ENCAPS_SSLv3:
+     return "SSLv3";
++#endif
+   case NESSUS_ENCAPS_TLSv1:
+     return "TLSv1";
+   default:
+@@ -1527,9 +1554,13 @@ get_encaps_through(code)
+  {
+   case NESSUS_ENCAPS_IP:
+    return "";
++#ifndef OPENSSL_NO_SSL2
+   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:

Modified: head/security/nessus-libraries/files/patch-libpcap-nessus__configure
==============================================================================
--- head/security/nessus-libraries/files/patch-libpcap-nessus__configure	Tue Sep 15 23:57:28 2015	(r397031)
+++ head/security/nessus-libraries/files/patch-libpcap-nessus__configure	Tue Sep 15 23:59:08 2015	(r397032)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509152359.t8FNx9g1065178>