aboutsummaryrefslogtreecommitdiff
path: root/security/stunnel
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2009-11-19 11:06:25 +0000
committerPeter Pentchev <roam@FreeBSD.org>2009-11-19 11:06:25 +0000
commitfdef7d0cd2bc69a65c319cf89d8a2c5603a0a9c2 (patch)
tree45e34511da914ac1d4bf7f9349bd1914c674f323 /security/stunnel
parent653e46c9d0fe1ad2b8848e63278ecc99d7b7a1ef (diff)
downloadports-fdef7d0cd2bc69a65c319cf89d8a2c5603a0a9c2.tar.gz
ports-fdef7d0cd2bc69a65c319cf89d8a2c5603a0a9c2.zip
Fix the build on FreeBSD 6.x (an older version of OpenSSL) by replacing
the official no_ticket.patch with an extended one ifdef'ing more options. Replace the src/client.c patch with the official execargs.patch. Bump PORTREVISION.
Notes
Notes: svn path=/head/; revision=244468
Diffstat (limited to 'security/stunnel')
-rw-r--r--security/stunnel/Makefile3
-rw-r--r--security/stunnel/distinfo6
-rw-r--r--security/stunnel/files/patch-src::client.c22
-rw-r--r--security/stunnel/files/patch-src::options.c42
4 files changed, 47 insertions, 26 deletions
diff --git a/security/stunnel/Makefile b/security/stunnel/Makefile
index 0347439f9014..826dcccc2d82 100644
--- a/security/stunnel/Makefile
+++ b/security/stunnel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= stunnel
PORTVERSION= 4.28
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \
ftp://stunnel.mirt.net/stunnel/ \
@@ -14,7 +15,7 @@ MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \
ftp://opensores.thebunker.net/pub/mirrors/stunnel/download/stunnel/src/
PATCH_SITES= ftp://stunnel.mirt.net/stunnel/
-PATCHFILES= no_ticket.patch
+PATCHFILES= execargs.patch
MAINTAINER= roam@FreeBSD.org
COMMENT= SSL encryption wrapper for standard network daemons
diff --git a/security/stunnel/distinfo b/security/stunnel/distinfo
index 7e6a660447cd..2afb56df4829 100644
--- a/security/stunnel/distinfo
+++ b/security/stunnel/distinfo
@@ -1,6 +1,6 @@
MD5 (stunnel-4.28.tar.gz) = 5bf753a042047f40a938e82ec7ece569
SHA256 (stunnel-4.28.tar.gz) = 9be98fb1aa5e96e44095df267d89b776aa539e6dce90dd0d54db675e9a95cd80
SIZE (stunnel-4.28.tar.gz) = 543008
-MD5 (no_ticket.patch) = e0915ac5b2e85ddc6f0e88952ca1c5ee
-SHA256 (no_ticket.patch) = 3fdcd746be953a026598143a59eba02896c75344575e555e2383d30902cb1932
-SIZE (no_ticket.patch) = 904
+MD5 (execargs.patch) = c893028f869f6d1f527373334605d639
+SHA256 (execargs.patch) = 88e682c0deee13d9768c8cbdd3e71f90dd26d92621d2e64542d5379a3939ac4c
+SIZE (execargs.patch) = 756
diff --git a/security/stunnel/files/patch-src::client.c b/security/stunnel/files/patch-src::client.c
deleted file mode 100644
index 8733316dfbdd..000000000000
--- a/security/stunnel/files/patch-src::client.c
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Do not pass null pointers to execvp().
-Forwarded: https://stunnel.mirt.net/cgi-bin/bugzilla3/show_bug.cgi?id=2
-Author: Peter Pentchev <roam@FreeBSD.org>
-Last-Update: 2009-11-13
-
---- src/client.c.orig
-+++ src/client.c
-@@ -859,6 +859,14 @@
- sigemptyset(&newmask);
- sigprocmask(SIG_SETMASK, &newmask, NULL);
- #endif
-+ if (c->opt->execargs != NULL && c->opt->execargs[0] == NULL) {
-+ free(c->opt->execargs);
-+ c->opt->execargs = NULL;
-+ }
-+ if (c->opt->execargs == NULL) {
-+ c->opt->execargs = calloc(2, sizeof(c->opt->execargs[0]));
-+ c->opt->execargs[0] = c->opt->execname;
-+ }
- execvp(c->opt->execname, c->opt->execargs);
- ioerror(c->opt->execname); /* execv failed */
- _exit(1);
diff --git a/security/stunnel/files/patch-src::options.c b/security/stunnel/files/patch-src::options.c
new file mode 100644
index 000000000000..78e15612cbc2
--- /dev/null
+++ b/security/stunnel/files/patch-src::options.c
@@ -0,0 +1,42 @@
+Description: Build on older OpenSSL versions without some options.
+Forwarded: https://stunnel.mirt.net/cgi-bin/bugzilla3/show_bug.cgi?id=3
+Author: Michal Trojnara <Michal.Trojnara@mirt.net>
+ Peter Pentchev <roam@ringlet.net>
+Last-Update: 2009-11-19
+
+--- src/options.c.orig
++++ src/options.c
+@@ -1136,7 +1136,9 @@
+ if(strcasecmp(opt, "sessiond"))
+ break;
+ section->option.sessiond=1;
++#ifdef SSL_OP_NO_TICKET
+ section->ssl_options|=SSL_OP_NO_TICKET;
++#endif
+ if(!name2addrlist(&section->sessiond_addr, arg, DEFAULT_LOOPBACK))
+ return "Failed to resolve sessiond server address";
+ return NULL; /* OK */
+@@ -1704,15 +1706,23 @@
+ {"TLS_D5_BUG", SSL_OP_TLS_D5_BUG},
+ {"TLS_BLOCK_PADDING_BUG", SSL_OP_TLS_BLOCK_PADDING_BUG},
+ {"DONT_INSERT_EMPTY_FRAGMENTS", SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS},
++#ifdef SSL_OP_NO_QUERY_MTU
+ {"NO_QUERY_MTU", SSL_OP_NO_QUERY_MTU},
++#endif
++#ifdef SSL_OP_COOKIE_EXCHANGE
+ {"COOKIE_EXCHANGE", SSL_OP_COOKIE_EXCHANGE},
++#endif
++#ifdef SSL_OP_NO_TICKET
+ {"NO_TICKET", SSL_OP_NO_TICKET},
++#endif
+ {"NO_SESSION_RESUMPTION_ON_RENEGOTIATION",
+ SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION},
+ #ifdef SSL_OP_NO_COMPRESSION
+ {"NO_COMPRESSION", SSL_OP_NO_COMPRESSION},
+ #endif
++#ifdef SSL_OP_SINGLE_ECDH_USE
+ {"SINGLE_ECDH_USE", SSL_OP_SINGLE_ECDH_USE},
++#endif
+ {"SINGLE_DH_USE", SSL_OP_SINGLE_DH_USE},
+ {"EPHEMERAL_RSA", SSL_OP_EPHEMERAL_RSA},
+ {"CIPHER_SERVER_PREFERENCE", SSL_OP_CIPHER_SERVER_PREFERENCE},