<How can I perform hostname verification with a mu...
# stackoverflow
r
How can I perform hostname verification with a multiplatform Ktor Socket connection? I am rewriting our Java api service in Kotlin Multiplatform, and working on a replacement for javax.net.ssl.SSLSocket to send and receive data between the server and client. I've been using the Ktor Socket to do this, and it's been perfect until this point. This is how we performed hostname verification in the Java code: if (hostNameVerification) { val hostnameVerifier = HttpsURLConnection.getDefaultHostnameVerifier() val sslSession = sslSocket!!.session // Verify that the...