izumo27 commented on code in PR #126:
URL: https://github.com/apache/pulsar-client-cpp/pull/126#discussion_r1033216214


##########
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:
   The variable name is misleading, but ```serviceUrl``` is parsed 
```physicalAddress```. So ```serviceUrl``` would be equal to actual broker 
hostname.
   
https://github.com/apache/pulsar-client-cpp/blob/v3.0.0/lib/ClientConnection.cc#L198-L199



-- 
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]

Reply via email to