summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
index 54457f4..347d6ef 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
@@ -21,7 +21,11 @@ OpenSSLCertificate::OpenSSLCertificate(boost::shared_ptr<X509> cert) : cert(cert
OpenSSLCertificate::OpenSSLCertificate(const ByteArray& der) {
+#if OPENSSL_VERSION_NUMBER <= 0x009070cfL
unsigned char* p = reinterpret_cast<unsigned char*>(const_cast<char*>(der.getData()));
+#else
+ const unsigned char* p = reinterpret_cast<const unsigned char*>(der.getData());
+#endif
cert = boost::shared_ptr<X509>(d2i_X509(NULL, &p, der.getSize()), X509_free);
parse();
}