SSLSocket hangs at getInputStream when android device is in wifi

后端 未结 1 958
时光取名叫无心
时光取名叫无心 2021-02-14 01:55

I want to have a SSL encrypted TCP server on the android device and a client on the computer which will connect to the device.

I create a SSLServerSocket on the Android

1条回答
  •  粉色の甜心
    2021-02-14 02:39

    You are right that there is a reverse DNS lookup that is timing out. In certain Java Runtime Environments, during the handshake with a raw IP address, the SSLContext unnecessarily performs a lookup of the server's IP address. This is to determine if the common name of the server certificate matches. Try using one of the solutions mentioned here:

    How to disable Java's SSL Reverse DNS Lookup

    0 讨论(0)
提交回复
热议问题