I did an app for a company and it supported API level 13+ (3.0+). It collects data from their CMS via XML and displays it on the app. This is done over HTTPS which worked fine until they upgraded their server to TLS 1.2. Now android versions below API level 20 won't fetch the XML because of SSLPeerUnverifiedException
and a whole lot of phones can't see this app anymore.
Is there a way to get past SSLPeerUnverified
while leaving TLS 1.2 enabled?
Note: The current SSL certificates are as follows:
AddTrust External CA Root
--> COMODO High-Assurance Secure Server CA
--> *.appdomain.com
Most helpful SOF article so far: Implementing TLS 1.2 on Android 2.3.3
Someone else on the team answered this but the result included the following:
SSLContext helper=null;
helper.init(null,null,null);
SSLContext.getInstance("TLSv1.2");
SSLEngine engine = helper.createSSLEngine();
Here's the function he used to check ssl and put everything in: