Fix build without openssl sslv2

from brad
This commit is contained in:
jasper 2012-06-27 12:10:19 +00:00
parent 447a9b9d9f
commit fa5ee7998b
2 changed files with 22 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.29 2012/06/16 09:01:29 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.30 2012/06/27 12:10:19 jasper Exp $
COMMENT= HTTP and WebDAV client library, with C interface
DISTNAME= neon-0.29.6
REVISION= 0
REVISION= 1
SHARED_LIBS= neon 28.0 # 29.6
CATEGORIES= net www devel

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-src_ne_openssl_c,v 1.3 2012/06/27 12:10:19 jasper Exp $
Allow building against OpenSSL without SSLv2 support.
--- src/ne_openssl.c.orig Wed Jun 27 07:35:42 2012
+++ src/ne_openssl.c Wed Jun 27 07:47:58 2012
@@ -569,8 +569,13 @@ ne_ssl_context *ne_ssl_context_create(int mode)
ctx->ctx = SSL_CTX_new(SSLv23_server_method());
SSL_CTX_set_session_cache_mode(ctx->ctx, SSL_SESS_CACHE_CLIENT);
} else {
+#ifdef OPENSSL_NO_SSL2
+ ne_free(ctx);
+ return NULL;
+#else
ctx->ctx = SSL_CTX_new(SSLv2_server_method());
SSL_CTX_set_session_cache_mode(ctx->ctx, SSL_SESS_CACHE_CLIENT);
+#endif
}
return ctx;
}