androidsslsslengine

Why SSLSocket support TLSv1.2 from API level 16+ but SSLEngine from API level 20+?


I just want to understand the difference between SSLSocket and SSLEngine classes? I can see in android document TLSv1.2 available for SSLSocket from API Level 16+ but for SSLEngine TLSv1.2 available from API Level 20+ https://developer.android.com/reference/javax/net/ssl/SSLSocket.html https://developer.android.com/reference/javax/net/ssl/SSLEngine

I am trying to use have created a server using https://github.com/TooTallNate/Java-WebSocket which is using SSLEngine. My server works fine with android devices running on API level 20+ but giving UNSUPPORTED_PROTOCOL error a device running on API level 17 during the handshake.


Solution

  • Resolved this issue by using Conscrypt Security Provider.