aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2015-03-03 18:45:49 +0000
committerVincent Richard <[email protected]>2015-03-03 18:45:49 +0000
commit4b2f682f9d34068b71ad12746150158185c4d288 (patch)
tree1ee1c21a7a5d261d3aa958d3d2c25dd677a3cb70
parentFixed type. (diff)
downloadvmime-4b2f682f9d34068b71ad12746150158185c4d288.tar.gz
vmime-4b2f682f9d34068b71ad12746150158185c4d288.zip
Issue #105: workaround for i2v() taking either a const or a non-const method.
-rw-r--r--src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp b/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp
index b187ae7a..abdfb95b 100644
--- a/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp
+++ b/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp
@@ -123,6 +123,15 @@ struct OpenSSLX509CertificateInternalData
X509* cert;
};
+
+// Workaround for i2v() taking either a const or a non-const 'method' on some platforms
+template <typename M>
+STACK_OF(CONF_VALUE)* call_i2v(M m, void* p1, STACK_OF(CONF_VALUE)* p2)
+{
+ return m->i2v(m, p1, p2);
+}
+
+
#endif // VMIME_BUILDING_DOC
@@ -409,7 +418,7 @@ bool X509Certificate_OpenSSL::verifyHostName
if (extValStr && method->i2v)
{
- STACK_OF(CONF_VALUE)* val = method->i2v(method, extValStr, NULL);
+ STACK_OF(CONF_VALUE)* val = call_i2v(method, extValStr, 0);
for (int j = 0 ; j < sk_CONF_VALUE_num(val) ; ++j)
{