mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject mesos git commit: Fixed `pem_to_rsa` for older SSL versions.
Date Tue, 22 May 2018 14:24:13 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 64243b078 -> d7d7cfbc3


Fixed `pem_to_rsa` for older SSL versions.

Review: https://reviews.apache.org/r/67248/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d7d7cfbc
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d7d7cfbc
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d7d7cfbc

Branch: refs/heads/master
Commit: d7d7cfbc3e5609fc9a4e8de8203a6ecb11afeac7
Parents: 64243b0
Author: Benjamin Bannier <benjamin.bannier@mesosphere.io>
Authored: Tue May 22 15:05:51 2018 +0200
Committer: Till Toenshoff <toenshoff@me.com>
Committed: Tue May 22 15:05:51 2018 +0200

----------------------------------------------------------------------
 3rdparty/libprocess/src/ssl/utilities.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d7d7cfbc/3rdparty/libprocess/src/ssl/utilities.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/ssl/utilities.cpp b/3rdparty/libprocess/src/ssl/utilities.cpp
index 36a4cb1..72ad079 100644
--- a/3rdparty/libprocess/src/ssl/utilities.cpp
+++ b/3rdparty/libprocess/src/ssl/utilities.cpp
@@ -379,7 +379,9 @@ Try<string> generate_hmac_sha256(
 template<typename Reader>
 Try<shared_ptr<RSA>> pem_to_rsa(const string& pem, Reader reader)
 {
-  BIO *bio = BIO_new_mem_buf(pem.c_str(), -1);
+  // We cast away constness from `pem`'s data since in older SSL versions
+  // `BIO_new_mem_buf` took a non-const `char*` which was semantically `const`.
+  BIO *bio = BIO_new_mem_buf(const_cast<char*>(pem.c_str()), -1);
   if (bio == nullptr) {
     return Error("Failed to create RSA key bio");
   }


Mime
View raw message