Remove isCertificateEntry check

This was returning false on some test keystores even when
getCertificate would correct return a certificate. Remove the check to
be consistent with how conscrypt loads trust anchors from the keystore.

Bug: 25897324
Change-Id: Ie87658a261ee7ba1cca6896e34b6c53b8abfba85
This commit is contained in:
Chad Brubaker
2015-11-26 14:00:50 -08:00
parent b61d3dd8a7
commit 9a0130865e

View File

@@ -47,9 +47,6 @@ class KeyStoreCertificateSource implements CertificateSource {
Set<X509Certificate> certificates = new ArraySet<>(mKeyStore.size());
for (Enumeration<String> en = mKeyStore.aliases(); en.hasMoreElements();) {
String alias = en.nextElement();
if (!mKeyStore.isCertificateEntry(alias)) {
continue;
}
X509Certificate cert = (X509Certificate) mKeyStore.getCertificate(alias);
if (cert != null) {
certificates.add(cert);