merlimat commented on code in PR #126:
URL: https://github.com/apache/pulsar-client-cpp/pull/126#discussion_r1033085459
##########
lib/ClientConnection.cc:
##########
@@ -254,6 +249,11 @@ ClientConnection::ClientConnection(const std::string&
logicalAddress, const std:
tlsSocket_ = ExecutorService::createTlsSocket(socket_, ctx);
+ if (!clientConfiguration.isTlsAllowInsecureConnection() &&
clientConfiguration.isValidateHostName()) {
+ LOG_DEBUG("Validating hostname for " << serviceUrl.host() << ":"
<< serviceUrl.port());
+
tlsSocket_->set_verify_callback(boost::asio::ssl::rfc2818_verification(serviceUrl.host()));
Review Comment:
When the client connects directly to the broker `serviceUrl` will be
different from the actual broker hostname. If each broker has different
certificates, this check would not be working
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]