Unbreak after openssl update (OpenSSL 1.0.0a).
From upstream. OK sthen@
This commit is contained in:
parent
c5f03a164f
commit
45fc5dbec4
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.23 2009/08/30 18:37:55 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.24 2010/10/03 13:02:19 dcoppa Exp $
|
||||
|
||||
COMMENT= HTTP and WebDAV client library, with C interface
|
||||
|
||||
DISTNAME= neon-0.28.6
|
||||
REVISION= 0
|
||||
SHARED_LIBS= neon 27.0 # .28.3
|
||||
CATEGORIES= net www devel
|
||||
|
||||
|
12
net/neon/patches/patch-macros_neon_m4
Normal file
12
net/neon/patches/patch-macros_neon_m4
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-macros_neon_m4,v 1.1 2010/10/03 13:02:19 dcoppa Exp $
|
||||
--- macros/neon.m4.orig Tue Aug 18 16:24:08 2009
|
||||
+++ macros/neon.m4 Fri Oct 1 12:32:40 2010
|
||||
@@ -908,7 +908,7 @@ yes|openssl)
|
||||
if test "$ne_cv_lib_ssl097" = "yes"; then
|
||||
AC_MSG_NOTICE([OpenSSL >= 0.9.7; EGD support not needed in neon])
|
||||
NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL (0.9.7 or later)])
|
||||
- NE_CHECK_FUNCS(CRYPTO_set_idptr_callback)
|
||||
+ NE_CHECK_FUNCS(CRYPTO_set_idptr_callback SSL_SESSION_cmp)
|
||||
else
|
||||
# Fail if OpenSSL is older than 0.9.6
|
||||
NE_CHECK_OPENSSLVER(ne_cv_lib_ssl096, 0.9.6, 0x00906000L)
|
31
net/neon/patches/patch-src_ne_openssl_c
Normal file
31
net/neon/patches/patch-src_ne_openssl_c
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-src_ne_openssl_c,v 1.1 2010/10/03 13:02:19 dcoppa Exp $
|
||||
--- src/ne_openssl.c.orig Tue Aug 18 15:35:23 2009
|
||||
+++ src/ne_openssl.c Fri Oct 1 12:32:40 2010
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/rand.h>
|
||||
+#include <openssl/opensslv.h>
|
||||
|
||||
#ifdef NE_HAVE_TS_SSL
|
||||
#include <stdlib.h> /* for abort() */
|
||||
@@ -603,6 +604,19 @@ void ne_ssl_context_destroy(ne_ssl_context *ctx)
|
||||
SSL_SESSION_free(ctx->sess);
|
||||
ne_free(ctx);
|
||||
}
|
||||
+
|
||||
+#if !defined(HAVE_SSL_SESSION_CMP) && !defined(SSL_SESSION_cmp) \
|
||||
+ && defined(OPENSSL_VERSION_NUMBER) \
|
||||
+ && OPENSSL_VERSION_NUMBER > 0x10000000L
|
||||
+/* OpenSSL 1.0 removed SSL_SESSION_cmp for no apparent reason - hoping
|
||||
+ * it is reasonable to assume that comparing the session IDs is
|
||||
+ * sufficient. */
|
||||
+static int SSL_SESSION_cmp(SSL_SESSION *a, SSL_SESSION *b)
|
||||
+{
|
||||
+ return a->session_id_length == b->session_id_length
|
||||
+ && memcmp(a->session_id, b->session_id, a->session_id_length) == 0;
|
||||
+}
|
||||
+#endif
|
||||
|
||||
/* For internal use only. */
|
||||
int ne__negotiate_ssl(ne_session *sess)
|
14
net/neon/patches/patch-src_ne_socket_c
Normal file
14
net/neon/patches/patch-src_ne_socket_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-src_ne_socket_c,v 1.1 2010/10/03 13:02:19 dcoppa Exp $
|
||||
--- src/ne_socket.c.orig Tue Aug 18 15:16:07 2009
|
||||
+++ src/ne_socket.c Fri Oct 1 12:32:40 2010
|
||||
@@ -1524,6 +1524,10 @@ int ne_sock_accept_ssl(ne_socket *sock, ne_ssl_context
|
||||
if (ret != 1) {
|
||||
return error_ossl(sock, ret);
|
||||
}
|
||||
+
|
||||
+ if (SSL_session_reused(ssl)) {
|
||||
+ NE_DEBUG(NE_DBG_SSL, "ssl: Server reused session.\n");
|
||||
+ }
|
||||
#elif defined(HAVE_GNUTLS)
|
||||
gnutls_init(&ssl, GNUTLS_SERVER);
|
||||
gnutls_credentials_set(ssl, GNUTLS_CRD_CERTIFICATE, ctx->cred);
|
Loading…
Reference in New Issue
Block a user