I have the following code:
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setConnectTimeout(60000); //set timeout to 60 seconds
conn.connect();
InputStream input = new BufferedInputStream(url.openStream());
OutputStream output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
while ((count = input.read(data)) != -1) {
output.write(data, 0, count);
}
output.close();
input.close();
I have this code for downloading files. And when I am executin it i get this IOException error that I can not find on any page:
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Not a CA certificate
I test it on Android 4.3 and it works normaly but not on 2.3. Any idea what can go wrong. It also work fine in browser and on iOS. I aslo check certificate on http://www.sslshopper.com/ and everythink works fine