Merge pull request #63178 from ClickHouse/backport/24.3/63122

Backport #63122 to 24.3: Set server name for SSL handshake in MongoDB engine
This commit is contained in:
robot-clickhouse 2024-04-30 15:35:51 +02:00 committed by GitHub
commit d2708667d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,8 @@ Poco::Net::StreamSocket StorageMongoDBSocketFactory::createSecureSocket(const st
Poco::Net::SocketAddress address(host, port); Poco::Net::SocketAddress address(host, port);
Poco::Net::SecureStreamSocket socket; Poco::Net::SecureStreamSocket socket;
socket.setPeerHostName(host);
socket.connect(address, connectTimeout); socket.connect(address, connectTimeout);
return socket; return socket;