Expose findByIssuerAndSignature

This will be used to create a custom conscrypt TrustedCertificateStore
to avoid loading all of the trusted certificates into memory in a
keystore.

Change-Id: Iaf54b691393ecadae6c7ff56b8adc6a2a2923d29
This commit is contained in:
Chad Brubaker
2015-11-25 13:12:55 -08:00
parent 6fea66116c
commit fa9beebb83
7 changed files with 64 additions and 0 deletions

View File

@@ -44,4 +44,12 @@ public class TestCertificateSource implements CertificateSource {
}
return anchor.getTrustedCert();
}
public X509Certificate findByIssuerAndSignature(X509Certificate cert) {
java.security.cert.TrustAnchor anchor = mIndex.findByIssuerAndSignature(cert);
if (anchor == null) {
return null;
}
return anchor.getTrustedCert();
}
}