Skip to content

Commit

Permalink
Added the macro to determine tls version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jai ASher committed Feb 17, 2017
1 parent fdef79e commit 9f17905
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pulsar-client-cpp/lib/ClientConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ isTlsAllowInsecureConnection_(false) {
if (clientConfiguration.isUseTls()) {
using namespace boost::filesystem;

#if BOOST_VERSION >= 105400
boost::asio::ssl::context ctx(executor_->io_service_, boost::asio::ssl::context::tlsv12_client);
#else
boost::asio::ssl::context ctx(executor_->io_service_, boost::asio::ssl::context::tlsv1_client);

#endif
if (clientConfiguration.isTlsAllowInsecureConnection()) {
ctx.set_verify_mode(boost::asio::ssl::context::verify_none);
isTlsAllowInsecureConnection_ = true;
Expand Down

0 comments on commit 9f17905

Please sign in to comment.