File sitecopy-support-neon-0.29.diff of Package sitecopy
Index: sitecopy-0.16.6/lib/neon/ne_openssl.c
===================================================================
--- sitecopy-0.16.6.orig/lib/neon/ne_openssl.c 2008-02-06 12:27:38.000000000 +0100
+++ sitecopy-0.16.6/lib/neon/ne_openssl.c 2010-09-06 14:33:36.278385141 +0200
@@ -615,6 +615,18 @@ void ne_ssl_context_destroy(ne_ssl_conte
ne_free(ctx);
}
+#if 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)
{