You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2015/06/26 06:06:12 UTC

[2/5] mesos git commit: Error if trying to create SSL socket when SSL is disabled.

Error if trying to create SSL socket when SSL is disabled.

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


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

Branch: refs/heads/master
Commit: ed84f36e24b96a2bef831f33bd7361a0103b3380
Parents: fa13557
Author: Joris Van Remoortere <jo...@gmail.com>
Authored: Thu Jun 25 21:05:08 2015 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Thu Jun 25 21:05:09 2015 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/libevent_ssl_socket.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ed84f36e/3rdparty/libprocess/src/libevent_ssl_socket.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/libevent_ssl_socket.cpp b/3rdparty/libprocess/src/libevent_ssl_socket.cpp
index 5955796..2920e0e 100644
--- a/3rdparty/libprocess/src/libevent_ssl_socket.cpp
+++ b/3rdparty/libprocess/src/libevent_ssl_socket.cpp
@@ -75,6 +75,11 @@ namespace network {
 Try<std::shared_ptr<Socket::Impl>> LibeventSSLSocketImpl::create(int s)
 {
   openssl::initialize();
+
+  if (!openssl::flags().enabled) {
+    return Error("SSL is disabled");
+  }
+
   auto socket = std::make_shared<LibeventSSLSocketImpl>(s);
   // See comment at 'initialize' declaration for why we call this.
   socket->initialize();