aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/postal
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2016-11-05 14:16:28 +0000
committerJohn Marino <marino@FreeBSD.org>2016-11-05 14:16:28 +0000
commit4875e3a46baf18c4dbc8d116e35077a6846459b5 (patch)
tree2f5a4378ec360bce8fc28d2166dc921fba52d365 /benchmarks/postal
parent5001d8cb7b1c1a701b4de67b6e999f7edc103a10 (diff)
downloadports-4875e3a46baf18c4dbc8d116e35077a6846459b5.tar.gz
ports-4875e3a46baf18c4dbc8d116e35077a6846459b5.zip
benchmarks/postal: Support DEFAULT_VERSIONS+=ssl
The newest version of OpenSSL doesn't have SSLv3_method, similar to LibreSSL, so update the patches to support both.
Notes
Notes: svn path=/head/; revision=425391
Diffstat (limited to 'benchmarks/postal')
-rw-r--r--benchmarks/postal/Makefile2
-rw-r--r--benchmarks/postal/files/patch-basictcp.cpp10
-rw-r--r--benchmarks/postal/files/patch-tcp.cpp10
3 files changed, 20 insertions, 2 deletions
diff --git a/benchmarks/postal/Makefile b/benchmarks/postal/Makefile
index 4453eee3f4c6..3bba63944531 100644
--- a/benchmarks/postal/Makefile
+++ b/benchmarks/postal/Makefile
@@ -35,6 +35,8 @@ GNUTLS_CPPFLAGS= $$(pkg-config --cflags gnutls)
GNUTLS_LDFLAGS= $$(pkg-config --libs gnutls)
OPENSSL_USE= OPENSSL=yes
OPENSSL_CONFIGURE_OFF= --disable-openssl
+OPENSSL_CPPFLAGS= -I${OPENSSLINC}
+OPENSSL_LDFLAGS= -L${OPENSSLLIB}
post-patch:
@${REINPLACE_CMD} -e \
diff --git a/benchmarks/postal/files/patch-basictcp.cpp b/benchmarks/postal/files/patch-basictcp.cpp
index 93215e9726d3..9bf6b52f4116 100644
--- a/benchmarks/postal/files/patch-basictcp.cpp
+++ b/benchmarks/postal/files/patch-basictcp.cpp
@@ -1,15 +1,23 @@
--- basictcp.cpp.orig 2012-01-01 11:36:27 UTC
+++ basictcp.cpp
-@@ -102,10 +102,10 @@ int base_tcp::ConnectTLS()
+@@ -102,10 +102,18 @@ int base_tcp::ConnectTLS()
m_sslMeth = NULL;
m_sslCtx = NULL;
m_ssl = NULL;
- m_sslMeth = SSLv2_client_method();
++#ifndef OPENSSL_NO_SSL3
+ m_sslMeth = SSLv3_client_method();
++#else
++ m_sslMeth = SSLv23_client_method();
++#endif
if(m_sslMeth == NULL)
{
- fprintf(stderr, "Can't get SSLv2_client_method.\n");
++#ifndef OPENSSL_NO_SSL3
+ fprintf(stderr, "Can't get SSLv3_client_method.\n");
++#else
++ fprintf(stderr, "Can't get SSLv23_client_method.\n");
++#endif
return 2;
}
m_sslCtx = SSL_CTX_new(m_sslMeth);
diff --git a/benchmarks/postal/files/patch-tcp.cpp b/benchmarks/postal/files/patch-tcp.cpp
index 0d9abd3679b6..90d56bb47c30 100644
--- a/benchmarks/postal/files/patch-tcp.cpp
+++ b/benchmarks/postal/files/patch-tcp.cpp
@@ -1,15 +1,23 @@
--- tcp.cpp.orig 2012-01-01 11:24:45 UTC
+++ tcp.cpp
-@@ -178,10 +178,10 @@ int tcp::ConnectTLS()
+@@ -178,10 +178,18 @@ int tcp::ConnectTLS()
#ifdef USE_OPENSSL
m_sslCtx = NULL;
m_ssl = NULL;
- m_sslMeth = SSLv2_client_method();
++#ifndef OPENSSL_NO_SSL3
+ m_sslMeth = SSLv3_client_method();
++#else
++ m_sslMeth = SSLv23_client_method();
++#endif
if(m_sslMeth == NULL)
{
- fprintf(stderr, "Can't get SSLv2_client_method.\n");
++#ifndef OPENSSL_NO_SSL3
+ fprintf(stderr, "Can't get SSLv3_client_method.\n");
++#else
++ fprintf(stderr, "Can't get SSLv23_client_method.\n");
++#endif
error();
return 2;
}