summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-15 18:05:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-15 18:05:52 (GMT)
commit1c95b70465d43c26a99c362fa2e512edc5b2b68d (patch)
tree18db107334b24a63561074d2a0523f8c8e5f6366 /Swiften/TLS
parentf88a23bd7a7b9f65ac413b862b926eca79bf0f3c (diff)
downloadswift-contrib-1c95b70465d43c26a99c362fa2e512edc5b2b68d.zip
swift-contrib-1c95b70465d43c26a99c362fa2e512edc5b2b68d.tar.bz2
Fixed OpenSSL compilation.
Diffstat (limited to 'Swiften/TLS')
-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();
}