You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2019/08/21 12:03:09 UTC
[mesos] branch master updated: Fixed deprecation warning when
building against OpenSSL 1.1.x.
This is an automated email from the ASF dual-hosted git repository.
tillt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new a370400 Fixed deprecation warning when building against OpenSSL 1.1.x.
a370400 is described below
commit a3704009fa8b81090fa2bf3f3ba0e9ed316dae57
Author: Till Toenshoff <to...@me.com>
AuthorDate: Wed Aug 21 14:01:49 2019 +0200
Fixed deprecation warning when building against OpenSSL 1.1.x.
OpenSSL 1.1.x deprecates 'ASN1_STRING_get_data' and replaces it
by 'ASN1_STRING_get0_data'.
Review: https://reviews.apache.org/r/71336/
---
3rdparty/libprocess/src/openssl.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/3rdparty/libprocess/src/openssl.cpp b/3rdparty/libprocess/src/openssl.cpp
index ee9a049..4aeab85 100644
--- a/3rdparty/libprocess/src/openssl.cpp
+++ b/3rdparty/libprocess/src/openssl.cpp
@@ -886,7 +886,12 @@ Try<Nothing> verify(
if (peer_hostname.isSome()) {
// Current name is a DNS name, let's check it.
const string dns_name =
- reinterpret_cast<char*>(ASN1_STRING_data(
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ // `ASN1_STRING_get_data` is deprecated since OpenSSL 1.1.0.
+ reinterpret_cast<char*>(ASN1_STRING_get_data(
+#else
+ reinterpret_cast<const char*>(ASN1_STRING_get0_data(
+#endif // OPENSSL_VERSION_NUMBER < 0x10100000L
current_name->d.dNSName));
// Make sure there isn't an embedded NUL character in the DNS name.