mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-12 00:04:54 +08:00
Before the handshake is performed, SecureSocketImpl::stateClientConnected overrides the peer hostname with its IP address, making it impossible to send SNI during the handshake in SecureSocketImpl::stateClientHandshakeStart. This behavior essentially breaks SNI and prevents the library from being used with load balancers that rely on SNI to determine the destination host. Everywhere else, the peer hostname is replaced by the IP address only when the peer hostname is empty. That makes total sense; however, it seems like this check was forgotten in SecureSocketImpl::stateClientConnected.