View | Details | Raw Unified | Return to bug 270101 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-21 / +11 lines)
Lines 1-8 Link Here
1
PORTNAME=	sslscan
1
PORTNAME=	sslscan
2
DISTVERSION=	1.11.12
2
DISTVERSION=	2.0.15
3
DISTVERSIONSUFFIX=	-${GH_ACCOUNT}
4
PORTREVISION=	1
3
PORTREVISION=	1
5
CATEGORIES=	security
4
CATEGORIES=	security
5
MASTER_SITES=	https://www.openssl.org/source/:openssl \
6
		ftp://ftp.cert.dfn.de/pub/tools/net/openssl/source/:openssl
7
DISTFILES=	openssl-${OPENSSL_VERSION}.tar.gz:openssl
6
8
7
MAINTAINER=	gavin@FreeBSD.org
9
MAINTAINER=	gavin@FreeBSD.org
8
COMMENT=	Fast SSL port scanner
10
COMMENT=	Fast SSL port scanner
Lines 10-36 Link Here
10
12
11
LICENSE=	GPLv3
13
LICENSE=	GPLv3
12
14
13
USES=		gmake
15
USES=		gmake perl5
16
USE_PERL5=	build
14
USE_GITHUB=	yes
17
USE_GITHUB=	yes
15
GH_ACCOUNT=	rbsec
18
GH_ACCOUNT=	rbsec
19
OPENSSL_VERSION=	1.1.1t
16
20
17
OPTIONS_DEFINE=	UNSAFESSL
21
ALL_TARGET=	static
18
OPTIONS_DEFAULT=	UNSAFESSL
19
UNSAFESSL_DESC=	Use openssl-unsafe as libssl provider (SSLv2 etc.)
20
22
21
UNSAFESSL_USES_OFF=	ssl
23
post-patch:
22
UNSAFESSL_BUILD_DEPENDS=	${LOCALBASE}/openssl-unsafe/lib/libssl.so:security/openssl-unsafe
24
	$(LN) -sf "${WRKDIR}/openssl-${OPENSSL_VERSION}" "${WRKSRC}/openssl"
23
UNSAFESSL_RUN_DEPENDS=		${UNSAFESSL_BUILD_DEPENDS}
24
UNSAFESSL_CFLAGS=	-I${LOCALBASE}/openssl-unsafe/include \
25
			-Wl,-rpath,${LOCALBASE}/openssl-unsafe/lib
26
UNSAFESSL_LDFLAGS=	-L${LOCALBASE}/openssl-unsafe/lib \
27
			-Wl,-rpath,${LOCALBASE}/openssl-unsafe/lib
28
UNSAFESSL_ALL_TARGET=	sslscan
29
25
30
.include <bsd.port.pre.mk>
26
.include <bsd.port.mk>
31
32
.if empty(PORT_OPTIONS:MUNSAFESSL) && ${SSL_DEFAULT:Mopenssl}
33
BROKEN=		Does not build with openssl
34
.endif
35
36
.include <bsd.port.post.mk>
(-)./distinfo (-3 / +5 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1543256607
1
TIMESTAMP = 1678412358
2
SHA256 (rbsec-sslscan-1.11.12-rbsec_GH0.tar.gz) = f453a6606ff115aa2b9485fbb20856d63f9110752e42069a02277d5e63a5ce0e
2
SHA256 (openssl-1.1.1t.tar.gz) = 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b
3
SIZE (rbsec-sslscan-1.11.12-rbsec_GH0.tar.gz) = 56346
3
SIZE (openssl-1.1.1t.tar.gz) = 9881866
4
SHA256 (rbsec-sslscan-2.0.15_GH0.tar.gz) = 0986ac647098b877f24c863c261bfb7cf545a41fd1120047337dfc44812c69a0
5
SIZE (rbsec-sslscan-2.0.15_GH0.tar.gz) = 111609
(-)./files/patch-Makefile (-9 / +88 lines)
Lines 1-14 Link Here
1
--- Makefile.orig	2018-06-15 17:47:17 UTC
1
--- Makefile.orig	2022-07-03 16:42:37.000000000 +0100
2
+++ Makefile
2
+++ Makefile	2023-03-10 23:53:36.901042000 +0000
3
@@ -1,6 +1,6 @@
3
@@ -1,12 +1,7 @@
4
 # set gcc as default if CC is not set
4
 # set gcc as default if CC is not set
5
 
5
 
6
-GIT_VERSION = $(shell git describe --tags --always --dirty=-wip)
6
-GIT_VERSION = $(shell git describe --tags --always --dirty=-wip)
7
+#GIT_VERSION = $(shell git describe --tags --always --dirty=-wip)
7
+VERSION = $(shell grep -E -o -m 1 "[0-9]+\.[0-9]+\.[0-9]+" Changelog)
8
 
8
 
9
 # Ugly hack to get version if git isn't installed
9
-# Ugly hack to get version if git isn't installed
10
 ifeq ($(GIT_VERSION),)
10
-ifeq ($(GIT_VERSION),)
11
@@ -25,7 +25,7 @@ endif
11
-  GIT_VERSION = $(shell grep -E -o -m 1 "[0-9]+\.[0-9]+\.[0-9]+" Changelog)
12
-endif
13
-
14
 # Detect OS
15
 OS := $(shell uname)
16
 ARCH := $(shell uname -m)
17
@@ -26,11 +21,11 @@
12
 
18
 
13
 SRCS      = sslscan.c
19
 SRCS      = sslscan.c
14
 BINDIR    = $(PREFIX)/bin
20
 BINDIR    = $(PREFIX)/bin
Lines 16-23 Link Here
16
+MANDIR    = $(PREFIX)/man
22
+MANDIR    = $(PREFIX)/man
17
 MAN1DIR   = $(MANDIR)/man1
23
 MAN1DIR   = $(MANDIR)/man1
18
 
24
 
19
 WARNINGS  = -Wall -Wformat=2 -Wformat-security
25
 WARNINGS  = -Wall -Wformat=2 -Wformat-security -Wno-deprecated-declarations
20
@@ -101,6 +101,9 @@ ifeq ($(OS), Darwin)
26
-DEFINES   = -DVERSION=\"$(GIT_VERSION)\"
27
+DEFINES   = -DVERSION=\"$(VERSION)\"
28
 
29
 # for dynamic linking
30
 LIBS      = -lssl -lcrypto
31
@@ -58,36 +53,12 @@
32
 CFLAGS += -std=gnu11
33
 
34
 # for static linking
35
-ifeq ($(STATIC_BUILD), TRUE)
36
 PWD          = $(shell pwd)/openssl
37
 LDFLAGS      += -L${PWD}/
38
 CFLAGS       += -I${PWD}/include/ -I${PWD}/
39
-ifeq ($(OS), Darwin)
40
-LIBS	     = ./openssl/libssl.a ./openssl/libcrypto.a -lz -lpthread
41
-else
42
 LIBS         = -lssl -lcrypto -lz -lpthread
43
-endif
44
-ifneq ($(OS), FreeBSD)
45
-	LIBS += -ldl
46
-endif
47
-ifeq ($(OS), SunOS)
48
-	LIBS += -lsocket -lnsl
49
-endif
50
-GIT_VERSION  := $(GIT_VERSION)-static
51
-else
52
-# for dynamic linking
53
-LDFLAGS   += -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/local/opt/openssl/lib -L/opt/local/lib
54
-CFLAGS    += -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/ssl/include/openssl -I/usr/local/opt/openssl/include -I/opt/local/include -I/opt/local/include/openssl
55
-endif
56
+VERSION  := $(VERSION)-static
57
 
58
-# Find the number of processors on the system (used in -j option in building OpenSSL).
59
-# Uses /usr/bin/nproc if available, otherwise defaults to 1.
60
-NUM_PROCS = 1
61
-ifneq (,$(wildcard /usr/bin/nproc))
62
-	NUM_PROCS = `/usr/bin/nproc --all`
63
-endif
64
-
65
-
66
 .PHONY: all sslscan clean install uninstall static opensslpull
67
 
68
 all: sslscan
69
@@ -114,6 +85,9 @@
21
 	install sslscan $(DESTDIR)$(BINDIR)/sslscan;
70
 	install sslscan $(DESTDIR)$(BINDIR)/sslscan;
22
 	install -d $(DESTDIR)$(MAN1DIR)/;
71
 	install -d $(DESTDIR)$(MAN1DIR)/;
23
 	install sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1;
72
 	install sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1;
Lines 27-29 Link Here
27
 else
76
 else
28
 	install -D sslscan $(DESTDIR)$(BINDIR)/sslscan;
77
 	install -D sslscan $(DESTDIR)$(BINDIR)/sslscan;
29
 	install -D sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1;
78
 	install -D sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1;
79
@@ -126,11 +100,7 @@
80
 .openssl.is.fresh: opensslpull
81
 	true
82
 opensslpull:
83
-	if [ -d openssl -a -d openssl/.git ]; then \
84
-		cd ./openssl && git checkout OpenSSL_1_1_1-stable && git pull | grep -q "Already up-to-date." && [ -e ../.openssl.is.fresh ] || touch ../.openssl.is.fresh ; \
85
-	else \
86
-		git clone --depth 1 -b OpenSSL_1_1_1-stable https://github.com/openssl/openssl ./openssl && cd ./openssl && touch ../.openssl.is.fresh ; \
87
-	fi
88
+	true
89
 
90
 # Need to build OpenSSL differently on OSX
91
 ifeq ($(OS), Darwin)
92
@@ -148,12 +118,12 @@
93
 endif
94
 
95
 openssl/libcrypto.a: openssl/Makefile
96
-	$(MAKE) -j $(NUM_PROCS) -C openssl depend
97
-	$(MAKE) -j $(NUM_PROCS) -C openssl all
98
-#	$(MAKE) -j $(NUM_PROCS) -C openssl test # Disabled because this takes 45+ minutes for OpenSSL v1.1.1.
99
+	$(MAKE) -C openssl depend
100
+	$(MAKE) -C openssl all
101
+#	$(MAKE) -C openssl test # Disabled because this takes 45+ minutes for OpenSSL v1.1.1.
102
 
103
 static: openssl/libcrypto.a
104
-	$(MAKE) -j $(NUM_PROCS) sslscan STATIC_BUILD=TRUE
105
+	$(MAKE) sslscan STATIC_BUILD=TRUE
106
 
107
 test:	static
108
 	./docker_test.sh
(-)./files/patch-sslscan.c (-19 lines)
Lines 1-19 Link Here
1
--- sslscan.c.orig	2018-06-15 17:47:17 UTC
2
+++ sslscan.c
3
@@ -112,6 +112,7 @@
4
 
5
 #if defined(__FreeBSD__) || defined(__OpenBSD__)
6
 #include <netinet/in.h>
7
+#include <arpa/inet.h>
8
 #endif
9
 
10
 #include "sslscan.h"
11
@@ -896,7 +897,7 @@ int testCompression(struct sslCheckOptions *options, c
12
 #endif
13
                         {
14
                             printf("%sOpenSSL version does not support compression%s\n", COL_RED, RESET);
15
-                            printf("%sRebuild with zlib1g-dev package for zlib support%s\n\n", COL_RED, RESET);
16
+                            printf("\n");
17
                         }
18
 
19
                         // Disconnect SSL over socket

Return to bug 270101