Closed yschimke closed 3 years ago
Fix will be
if (hostname != null) {
sslParameters.serverNames = listOf(SNIHostName(hostname))
}
The first problem with SNIHostName turns out to be that you can't use SNI with localhost! So I've switched to a fake "local.host"
https://tools.ietf.org/html/rfc6066#page-6 specifies a FQDN is required.
Not sure if we should force it?
Should be localhost.localdomain
Related to https://github.com/square/okhttp/pull/6554 but not likely the cause, the SNI hostname extension isn't set with socket channels. This was previously assumed to be in place from JDK7+.