aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2015-01-11 14:53:04 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2015-01-11 14:53:04 +0000
commita5612de6506641038ef74bd172856fb1ed550321 (patch)
treec906d07e5acf238f300d878878fb8340f2dacf36 /www
parentd71f7df2bc455495836e58dff8ab2a86d2bf349c (diff)
downloadports-a5612de6506641038ef74bd172856fb1ed550321.tar.gz
ports-a5612de6506641038ef74bd172856fb1ed550321.zip
- Fix build when OpenSSL doesn't support SSL2/SSL3
- Negotiate the highest available SSL/TLS version by default using SSLv23_client_method PR: 195796
Notes
Notes: svn path=/head/; revision=376788
Diffstat (limited to 'www')
-rw-r--r--www/webstone-ssl/Makefile1
-rw-r--r--www/webstone-ssl/files/patch-get.c45
2 files changed, 46 insertions, 0 deletions
diff --git a/www/webstone-ssl/Makefile b/www/webstone-ssl/Makefile
index 00dd6fbf6613..8b421ee9434f 100644
--- a/www/webstone-ssl/Makefile
+++ b/www/webstone-ssl/Makefile
@@ -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
diff --git a/www/webstone-ssl/files/patch-get.c b/www/webstone-ssl/files/patch-get.c
new file mode 100644
index 000000000000..ced281924ecd
--- /dev/null
+++ b/www/webstone-ssl/files/patch-get.c
@@ -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) {