Isn't that supposed to pick tls 1.3 by default in Android?

235 Views Asked by At

According to https://developer.android.com/about/versions/10/behavior-changes-all, it says "In Android 10 and higher, TLS 1.3 is enabled by default for all TLS connections."

javax.net.ssl.HttpsUrlConnection con = (javax.net.ssl.HttpsUrlConnection)new URL("myhttpsserverurl").openConnection();

My https Server supports TLS 1.3 that I confirmed. I have Android 12 device.

I didn't explicitly use setSSLSocketFactory, which means I believe it uses "Default" one.

However, when I debugged the HttpsUrlConnection, it seems that it always picked TLS 1.2, not 1.3.

Is there anything I misunderstood?

I believe "Default" should pick the latest one available, which is TLS 1.3, because that is the latest one the server supports. If the server didn't support TLS 1.3, then it should pick 1.2 to continue...

Please let me know if I misunderstood something then.

Thanks,

0

There are 0 best solutions below