Blob Blame History Raw
Patch by Robert Scheck <robert@fedoraproject.org> for zarafa >= 6.40.0, which adds some
forward compatibility regarding OpenSSL 1.0.0. Without this patch, compiling while using
OpenSSL 1.0.0 will fail with "stdsoap2.cpp:4095: error: invalid conversion from 'const
X509V3_EXT_METHOD*' to 'X509V3_EXT_METHOD*'". Right now, Fedora 12 and/or later as well
as RHEL 6 and/or later are using OpenSSL 1.0.0 and thus depend on this patch. In order to
get OpenSSL 0.9.x and OpenSSL 1.0.0 working, the preprocessor condition is required.

--- zarafa-6.40.0/provider/soap/stdsoap2.cpp		2010-05-31 19:28:55.000000000 +0200
+++ zarafa-6.40.0/provider/soap/stdsoap2.cpp.openssl	2010-06-05 21:29:00.000000000 +0200
@@ -4092,7 +4092,12 @@
           { X509_EXTENSION *ext = X509_get_ext(peer, i);
             const char *ext_str = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
             if (ext_str && !strcmp(ext_str, "subjectAltName"))
-            { X509V3_EXT_METHOD *meth = X509V3_EXT_get(ext);
+            {
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+              const X509V3_EXT_METHOD *meth = X509V3_EXT_get(ext);
+#else 
+              X509V3_EXT_METHOD *meth = X509V3_EXT_get(ext);
+#endif
               void *ext_data;
 #if (OPENSSL_VERSION_NUMBER >= 0x0090800fL)
               const unsigned char *data;