You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2017/01/25 14:44:52 UTC

thrift git commit: THRIFT-3892 support OpenSSL before 0.9.8f during build Client: C++ Patch: Udit Raikwar

Repository: thrift
Updated Branches:
  refs/heads/master 3d6e2a507 -> 6fe7fa1b7


THRIFT-3892 support OpenSSL before 0.9.8f during build
Client: C++
Patch: Udit Raikwar <ud...@users.noreply.github.com>

This closes #1057


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

Branch: refs/heads/master
Commit: 6fe7fa1b7ed72215a59e93c680a209a99530fada
Parents: 3d6e2a5
Author: James E. King, III <jk...@apache.org>
Authored: Wed Jan 25 09:43:24 2017 -0500
Committer: James E. King, III <jk...@apache.org>
Committed: Wed Jan 25 09:43:24 2017 -0500

----------------------------------------------------------------------
 lib/cpp/src/thrift/transport/TSSLSocket.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/6fe7fa1b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
index 0af20cb..4c7be6d 100644
--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp
+++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
@@ -484,8 +484,11 @@ void TSSLSocket::checkHandshake() {
       }
     } while (rc == 2);
   } else {
-    // set the SNI hostname
-    SSL_set_tlsext_host_name(ssl_, getHost().c_str());
+    // OpenSSL < 0.9.8f does not have SSL_set_tlsext_host_name()
+    #if defined(SSL_set_tlsext_host_name)
+      // set the SNI hostname
+      SSL_set_tlsext_host_name(ssl_, getHost().c_str());
+    #endif
     do {
       rc = SSL_connect(ssl_);
       if (rc <= 0) {