1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Merge pull request #16 from owncloud/check_server_certificates_in_SSO_webview

Check server certificates in sso webview
This commit is contained in:
David A. Velasco 2014-03-13 08:45:30 +01:00
commit 30acd4875d

View File

@ -172,5 +172,12 @@ public class NetworkUtils {
return mConnManager;
}
public static boolean isCertInKnownServersStore(Certificate cert, Context context) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
KeyStore knownServers = getKnownServersStore(context);
Log.d(TAG, "Certificate - HashCode: " + cert.hashCode() + " "
+ Boolean.toString(knownServers.isCertificateEntry(Integer.toString(cert.hashCode()))));
return knownServers.isCertificateEntry(Integer.toString(cert.hashCode()));
}
}