security/distcache: Configure SSL base, fix build on LibreSSL

While here, simplify existing patch for modern FreeBSD and DragonFly
This commit is contained in:
John Marino 2016-09-12 13:23:47 +00:00
parent 9d2b87ac92
commit 3e44fb49d9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=421923
6 changed files with 29 additions and 30 deletions

View file

@ -14,12 +14,11 @@ COMMENT= Distributed OpenSSL session caching tools
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= libtool tar:bzip2
USES= libtool ssl tar:bzip2
USE_RC_SUBR= dc_server
USE_OPENSSL= yes
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-shared
CONFIGURE_ARGS= --enable-shared --with-ssl=${OPENSSLBASE}
INSTALL_TARGET= install-strip
SUB_LIST= NAME=dc_server

View file

@ -0,0 +1,10 @@
--- libnal/proto_fd.c.orig 2003-11-27 00:02:32 UTC
+++ libnal/proto_fd.c
@@ -24,6 +24,7 @@
#include <libnal/nal.h>
#include "nal_internal.h"
#include <libsys/post.h>
+#include <sys/limits.h>
/**************************/
/* predeclare our vtables */

View file

@ -1,18 +0,0 @@
*** libnal/proto_fd.c.ori Wed Apr 13 19:34:07 2005
--- libnal/proto_fd.c Wed Apr 13 21:51:20 2005
***************
*** 24,29 ****
--- 24,36 ----
#include <libnal/nal.h>
#include "nal_internal.h"
#include <libsys/post.h>
+ #ifdef __FreeBSD__
+ #if __FreeBSD_version >= 502010
+ #include <sys/limits.h>
+ #else
+ #include <machine/limits.h>
+ #endif
+ #endif /* __FreeBSD__ */
/**************************/
/* predeclare our vtables */

View file

@ -1,6 +1,6 @@
--- ssl/swamp/swamp.c.orig 2004-02-19 15:37:33.000000000 -0500
+++ ssl/swamp/swamp.c 2015-03-23 19:47:07.787300000 -0400
@@ -104,8 +104,10 @@
--- ssl/swamp/swamp.c.orig 2004-02-19 20:37:33 UTC
+++ ssl/swamp/swamp.c
@@ -104,10 +104,14 @@ static SSL_CTX *ossl_setup_ssl_ctx(const
switch(config->sslmeth) {
case SWAMP_SSLMETH_NORMAL:
sslmethod = SSLv23_client_method(); break;
@ -8,6 +8,10 @@
case SWAMP_SSLMETH_SSLv2:
sslmethod = SSLv2_client_method(); break;
+#endif
+#ifndef OPENSSL_NO_SSL3
case SWAMP_SSLMETH_SSLv3:
sslmethod = SSLv3_client_method(); break;
+#endif
case SWAMP_SSLMETH_TLSv1:
sslmethod = TLSv1_client_method(); break;
default:

View file

@ -1,6 +1,6 @@
--- ssl/swamp/swamp.h.orig 2004-02-17 15:29:34.000000000 -0500
+++ ssl/swamp/swamp.h 2015-03-23 19:47:20.490894000 -0400
@@ -161,7 +161,9 @@
--- ssl/swamp/swamp.h.orig 2004-02-17 20:29:34 UTC
+++ ssl/swamp/swamp.h
@@ -161,7 +161,9 @@ char *util_parse_escaped_string(const ch
typedef enum st_swamp_sslmeth {
SWAMP_SSLMETH_NORMAL, /* SSLv23_client_method() */

View file

@ -1,6 +1,6 @@
--- ssl/swamp/utils.c.orig 2004-02-17 15:29:34.000000000 -0500
+++ ssl/swamp/utils.c 2015-03-23 19:47:34.795067000 -0400
@@ -269,8 +269,10 @@
--- ssl/swamp/utils.c.orig 2004-02-17 20:29:34 UTC
+++ ssl/swamp/utils.c
@@ -269,10 +269,14 @@ int util_parse_sslmeth(const char *str_t
{
if(!strcmp(str_toconvert, "normal"))
*val = SWAMP_SSLMETH_NORMAL;
@ -8,6 +8,10 @@
else if(!strcmp(str_toconvert, "sslv2"))
*val = SWAMP_SSLMETH_SSLv2;
+#endif
+#ifndef OPENSSL_NO_SSL3
else if(!strcmp(str_toconvert, "sslv3"))
*val = SWAMP_SSLMETH_SSLv3;
+#endif
else if(!strcmp(str_toconvert, "tlsv1"))
*val = SWAMP_SSLMETH_TLSv1;
else