use of org.nhindirect.stagent.cert.impl.provider.PublicLdapCertificateStoreProvider in project nhin-d by DirectProject.
the class LdapCertificateStoreTest method testPublicLdapSearch_orgLevelCert_assertCertExists.
public void testPublicLdapSearch_orgLevelCert_assertCertExists() throws Exception {
addStockPublicLDAPCertificats();
PublicLdapCertificateStoreProvider provider = new PublicLdapCertificateStoreProvider(null, null);
CertificateResolver resolver = provider.get();
Collection<X509Certificate> certs = resolver.getCertificates(new InternetAddress("testdomain.com"));
assertEquals(1, certs.size());
X509Certificate cert = certs.iterator().next();
assertTrue(cert.getSubjectX500Principal().toString().contains("direct.fnhubapp01.qa.medplus.com"));
}
Aggregations