summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/protocols/ace/INet/SSL_X509Cert.inl11
1 files changed, 8 insertions, 3 deletions
diff --git a/ACE/protocols/ace/INet/SSL_X509Cert.inl b/ACE/protocols/ace/INet/SSL_X509Cert.inl
index d0b7905b0c4..dd017526178 100644
--- a/ACE/protocols/ace/INet/SSL_X509Cert.inl
+++ b/ACE/protocols/ace/INet/SSL_X509Cert.inl
@@ -37,9 +37,14 @@ namespace ACE
::X509_free (this->ssl_cert_);
if (ssl_cert != 0)
- CRYPTO_add (&(ssl_cert->references),
- 1,
- CRYPTO_LOCK_X509);
+ {
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ ::X509_up_ref(x509);
+#else
+ CRYPTO_add (&(ssl_cert->references),
+ 1,
+ CRYPTO_LOCK_X509);
+ }
this->ssl_cert_ = ssl_cert;
return *this;
}