( persicsb | 2025. 08. 03., v – 02:26 )

Ha emögött openssl s_client van, és nem használt -connect paramétert, akkor egyszerű a megoldás: add meg a --servername paramétert, hogy az SNI működésbe léphessen. Ezek a szerverek több site-ot is kiszolgálnak (hasonlóan a webszerverek virtuális hosztjaihoz, lásd Apache VirtualHost stb.), és a Server Name Identification dönti el, hogy melyik virtuális hoszthoz akarnak csatlakozni, és így tanúsítványt használják.

Az openssl dokumentáció tök jól leírja:

-servername name

Set the TLS SNI (Server Name Indication) extension in the ClientHello message to the given value. If -servername is not provided, the TLS SNI extension will be populated with the name given to -connect if it follows a DNS name format. If -connect is not provided either, the SNI is set to "localhost". This is the default since OpenSSL 1.1.1.

Even though SNI should normally be a DNS name and not an IP address, if -servername is provided then that name will be sent, regardless of whether it is a DNS name or not.