--- security/sslscan/Makefile (revision 412671) +++ security/sslscan/Makefile (working copy) @@ -2,11 +2,11 @@ # $FreeBSD$ PORTNAME= sslscan -PORTVERSION= 1.8.2 -PORTREVISION= 1 +PORTVERSION= 1.11.6 CATEGORIES= security -MASTER_SITES= SF/${PORTNAME}/${PORTNAME} -EXTRACT_SUFX= .tgz +USE_GITHUB= yes +GH_ACCOUNT= rbsec +GH_TAGNAME= ${PORTVERSION}-${GH_ACCOUNT} MAINTAINER= matthieu@labs.fr COMMENT= SSLScan is a fast SSL port scanner @@ -13,9 +13,7 @@ LICENSE= GPLv3 -CFLAGS+= -I${LOCALBASE}/include ${CPPFLAGS} -LDFLAGS+= -L${LOCALBASE}/lib ${LIBS} -MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +USES= gmake USE_OPENSSL= yes .include --- security/sslscan/distinfo (revision 412671) +++ security/sslscan/distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (sslscan-1.8.2.tgz) = 3b728804456042d96d5c8ccd42326f8e5719d091986793bb7b852a36b50d2b3e -SIZE (sslscan-1.8.2.tgz) = 22176 +SHA256 (rbsec-sslscan-1.11.6-1.11.6-rbsec_GH0.tar.gz) = 18932a78ad968dc5859b8cc72c84e64a46367887eb9302eaf13069bb9da1e08d +SIZE (rbsec-sslscan-1.11.6-1.11.6-rbsec_GH0.tar.gz) = 50002 --- security/sslscan/files/patch-Makefile (revision 412671) +++ security/sslscan/files/patch-Makefile (working copy) @@ -1,22 +1,33 @@ ---- ./Makefile.orig 2009-09-01 14:35:59.000000000 +0200 -+++ ./Makefile 2011-06-21 17:37:30.000000000 +0200 -@@ -1,13 +1,14 @@ - SRCS = sslscan.c --BINPATH = /usr/bin/ --MANPATH = /usr/share/man/ -+BINPATH = ${PREFIX}/bin/ -+MANPATH = ${PREFIX}/man -+CC = ${CC} +--- Makefile.orig 2016-03-24 21:02:55 UTC ++++ Makefile +@@ -3,7 +3,7 @@ ifndef CC + CC=gcc + endif - all: -- gcc -g -Wall -lssl -o sslscan $(SRCS) $(LDFLAGS) $(CFLAGS) -+ ${CC} -g -Wall -lssl -lcrypto -o sslscan $(SRCS) $(LDFLAGS) $(CFLAGS) +-GIT_VERSION = $(shell git describe --tags --always --dirty=-wip) ++#GIT_VERSION = $(shell git describe --tags --always --dirty=-wip) - install: -- cp sslscan $(BINPATH) -- cp sslscan.1 $(MANPATH)man1 -+ install -s -m 755 sslscan $(DESTDIR)$(BINPATH) -+ install -m 644 sslscan.1 $(DESTDIR)$(MANPATH)/man1 + # Ugly hack to get version if git isn't installed + ifeq ($(GIT_VERSION),) +@@ -14,9 +14,9 @@ endif + OS := $(shell uname) - uninstall: - rm -f $(BINPATH)sslscan + SRCS = sslscan.c +-PREFIX = /usr ++#PREFIX = /usr + BINDIR = $(PREFIX)/bin +-MANDIR = $(PREFIX)/share/man ++MANDIR = $(PREFIX)/man + MAN1DIR = $(MANDIR)/man1 + + WARNINGS = -Wall -Wformat=2 +@@ -68,6 +68,9 @@ install: + ifeq ($(OS), Darwin) + install sslscan $(DESTDIR)$(BINDIR)/sslscan; + install sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1; ++else ifeq ($(OS), FreeBSD) ++ install -s -m 755 sslscan $(DESTDIR)$(BINDIR) ++ install -m 644 sslscan.1 $(DESTDIR)$(MAN1DIR) + else + install -D sslscan $(DESTDIR)$(BINDIR)/sslscan; + install -D sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1; --- security/sslscan/files/patch-sslscan.c (revision 412671) +++ security/sslscan/files/patch-sslscan.c (working copy) @@ -1,120 +1,23 @@ ---- sslscan.c.orig 2009-09-01 14:35:59.000000000 +0200 -+++ sslscan.c 2015-03-07 23:26:34.286277205 +0100 -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include +--- sslscan.c.orig 2016-03-24 21:02:55 UTC ++++ sslscan.c +@@ -788,7 +788,7 @@ int testCompression(struct sslCheckOptio + #endif + { + printf("%sOpenSSL version does not support compression%s\n", COL_RED, RESET); +- printf("%sRebuild with zlib1g-dev package for zlib support%s\n\n", COL_RED, RESET); ++ printf("\n"); + } - // Defines... - #define false 0 -@@ -563,6 +564,7 @@ - } - if (options->xmlOutput != 0) - fprintf(options->xmlOutput, " sslversion=\""); -+#ifndef OPENSSL_NO_SSL2 - if (sslCipherPointer->sslMethod == SSLv2_client_method()) - { - if (options->xmlOutput != 0) -@@ -571,8 +573,11 @@ - printf("SSLv2 || "); - else - printf("SSLv2 "); -- } -- else if (sslCipherPointer->sslMethod == SSLv3_client_method()) -+ } -+ else + // Disconnect SSL over socket +@@ -1291,7 +1291,11 @@ int testCipher(struct sslCheckOptions *o + return false; + } + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L + cipherid = SSL_CIPHER_get_id(sslCipherPointer); ++#else ++ cipherid = sslCipherPointer->id; +#endif -+#ifndef OPENSSL_NO_SSL3 -+ if (sslCipherPointer->sslMethod == SSLv3_client_method()) - { - if (options->xmlOutput != 0) - fprintf(options->xmlOutput, "SSLv3\" bits=\""); -@@ -582,6 +587,7 @@ - printf("SSLv3 "); - } - else -+#endif - { - if (options->xmlOutput != 0) - fprintf(options->xmlOutput, "TLSv1\" bits=\""); -@@ -688,6 +694,7 @@ - cipherStatus = SSL_connect(ssl); - if (cipherStatus == 1) - { -+#ifndef OPENSSL_NO_SSL2 - if (sslMethod == SSLv2_client_method()) - { - if (options->xmlOutput != 0) -@@ -697,7 +704,10 @@ - else - printf(" SSLv2 "); - } -- else if (sslMethod == SSLv3_client_method()) -+ else -+#endif -+#ifndef OPENSSL_NO_SSL3 -+ if (sslMethod == SSLv3_client_method()) - { - if (options->xmlOutput != 0) - fprintf(options->xmlOutput, " xmlOutput != 0) - fprintf(options->xmlOutput, " sslVersion) - { - case ssl_all: -+#ifndef OPENSSL_NO_SSL2 - status = defaultCipher(options, SSLv2_client_method()); - if (status != false) -+#endif -+#ifndef OPENSSL_NO_SSL3 - status = defaultCipher(options, SSLv3_client_method()); - if (status != false) -+#endif - status = defaultCipher(options, TLSv1_client_method()); - break; -+#ifndef OPENSSL_NO_SSL2 - case ssl_v2: - status = defaultCipher(options, SSLv2_client_method()); - break; -+#endif -+#ifndef OPENSSL_NO_SSL3 - case ssl_v3: - status = defaultCipher(options, SSLv3_client_method()); - break; -+#endif - case tls_v1: - status = defaultCipher(options, TLSv1_client_method()); - break; -@@ -1415,16 +1434,24 @@ - switch (options.sslVersion) - { - case ssl_all: -+#ifndef OPENSSL_NO_SSL2 - populateCipherList(&options, SSLv2_client_method()); -+#endif -+#ifndef OPENSSL_NO_SSL3 - populateCipherList(&options, SSLv3_client_method()); -+#endif - populateCipherList(&options, TLSv1_client_method()); - break; -+#ifndef OPENSSL_NO_SSL2 - case ssl_v2: - populateCipherList(&options, SSLv2_client_method()); - break; -+#endif -+#ifndef OPENSSL_NO_SSL3 - case ssl_v3: - populateCipherList(&options, SSLv3_client_method()); - break; -+#endif - case tls_v1: - populateCipherList(&options, TLSv1_client_method()); - break; + cipherid = cipherid & 0x00ffffff; // remove first byte which is the version (0x03 for TLSv1/SSLv3) + + // Show Cipher Status