1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

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.
This commit is contained in:
Peter Pentchev 2009-11-19 11:06:25 +00:00
parent 653e46c9d0
commit fdef7d0cd2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=244468
4 changed files with 47 additions and 26 deletions

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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},