Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jan 2015 14:53:04 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r376788 - in head/www/webstone-ssl: . files
Message-ID:  <201501111453.t0BEr4B9068815@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Sun Jan 11 14:53:04 2015
New Revision: 376788
URL: https://svnweb.freebsd.org/changeset/ports/376788
QAT: https://qat.redports.org/buildarchive/r376788/

Log:
  - Fix build when OpenSSL doesn't support SSL2/SSL3
  - Negotiate the highest available SSL/TLS version by default using
    SSLv23_client_method
  
  PR:		195796

Added:
  head/www/webstone-ssl/files/patch-get.c   (contents, props changed)
Modified:
  head/www/webstone-ssl/Makefile

Modified: head/www/webstone-ssl/Makefile
==============================================================================
--- head/www/webstone-ssl/Makefile	Sun Jan 11 14:46:44 2015	(r376787)
+++ head/www/webstone-ssl/Makefile	Sun Jan 11 14:53:04 2015	(r376788)
@@ -3,6 +3,7 @@
 
 PORTNAME=	webstone
 PORTVERSION=	2.5
+PORTREVISION=	1
 CATEGORIES=	www benchmarks
 MASTER_SITES=	http://crypto.stanford.edu/~nagendra/projects/WebStone/download/
 PKGNAMESUFFIX=	-ssl

Added: head/www/webstone-ssl/files/patch-get.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/webstone-ssl/files/patch-get.c	Sun Jan 11 14:53:04 2015	(r376788)
@@ -0,0 +1,45 @@
+--- get.c.orig	2000-06-21 19:15:41 UTC
++++ get.c
+@@ -169,27 +169,33 @@ get(char *loc, NETPORT port, char *url, 
+       OpenSSL_add_all_algorithms();
+       OpenSSL_add_ssl_algorithms();
+ 
+-		if(ssl_version != NULL && strcasecmp(ssl_version, "SSLv23") == 0) {
+-			if((ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) {
+-				ERR_print_errors_fp(stderr);
+-				goto error;
+-			}
+-			D_PRINTF( "SSL version = SSLv23\n" );
+-		}
+-		else if(ssl_version != NULL && strcasecmp(ssl_version, "SSLv2") == 0) {
++#ifndef OPENSSL_NO_SSL2
++		if(ssl_version != NULL && strcasecmp(ssl_version, "SSLv2") == 0) {
+ 			if((ctx = SSL_CTX_new(SSLv2_client_method())) == NULL) {
+ 				ERR_print_errors_fp(stderr);
+ 				goto error;
+ 			}
+ 			D_PRINTF( "SSL version = SSLv2\n" );
+ 		}
+-		else {
++		else
++#endif
++#ifndef OPENSSL_NO_SSL3_METHOD
++		if(ssl_version != NULL && strcasecmp(ssl_version, "SSLv3") == 0) {
+ 			if((ctx = SSL_CTX_new(SSLv3_client_method())) == NULL) {
+ 				ERR_print_errors_fp(stderr);
+ 				goto error;
+ 			}
+ 			D_PRINTF( "SSL version = SSLv3\n" );
+ 		}
++		else
++#endif
++		{
++			if((ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) {
++				ERR_print_errors_fp(stderr);
++				goto error;
++			}
++			D_PRINTF( "SSL version = SSLv23\n" );
++		}
+ 		
+ 		/* set preferred cipher */
+ 		if(ssl_cipher != NULL && strlen(ssl_cipher) > 0) {



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