SSLContext context = SSLContext.getInstance("SSL");
T开发者_StackOverflow社区he above line results in the exception:
java.security.NoSuchAlgorithmException: SSLContext SSL implementation not found
I'm using Android 2.0 SDK
and when specifying "TLS"
, it is accepted.
How come I get the exception? Doesn't Android support SSL?
If you are using the default Harmony JSSE, "TLS" is the only protocol it supports, which is the same as SSLv3.
You have to find another JSSE if you need to use an older version of SSL.
News from IO 2014. Now it can be installed:
SSLContext get sSLContext(Context ){
ProviderInstaller.instalelIfNeeded(context);
return SSLContext.getInstance("SSL");
}
For more information see this blog and google services security.
精彩评论