Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Nov 2016 14:16:28 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r425391 - in head/benchmarks/postal: . files
Message-ID:  <201611051416.uA5EGSXn023195@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sat Nov  5 14:16:28 2016
New Revision: 425391
URL: https://svnweb.freebsd.org/changeset/ports/425391

Log:
  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.

Modified:
  head/benchmarks/postal/Makefile
  head/benchmarks/postal/files/patch-basictcp.cpp
  head/benchmarks/postal/files/patch-tcp.cpp

Modified: head/benchmarks/postal/Makefile
==============================================================================
--- head/benchmarks/postal/Makefile	Sat Nov  5 13:44:27 2016	(r425390)
+++ head/benchmarks/postal/Makefile	Sat Nov  5 14:16:28 2016	(r425391)
@@ -35,6 +35,8 @@ GNUTLS_CPPFLAGS=	$$(pkg-config --cflags 
 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 \

Modified: head/benchmarks/postal/files/patch-basictcp.cpp
==============================================================================
--- head/benchmarks/postal/files/patch-basictcp.cpp	Sat Nov  5 13:44:27 2016	(r425390)
+++ head/benchmarks/postal/files/patch-basictcp.cpp	Sat Nov  5 14:16:28 2016	(r425391)
@@ -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);

Modified: head/benchmarks/postal/files/patch-tcp.cpp
==============================================================================
--- head/benchmarks/postal/files/patch-tcp.cpp	Sat Nov  5 13:44:27 2016	(r425390)
+++ head/benchmarks/postal/files/patch-tcp.cpp	Sat Nov  5 14:16:28 2016	(r425391)
@@ -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;
    }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611051416.uA5EGSXn023195>