use of de.trustable.ca3s.core.domain.CertificateAttribute in project ca3sCore by kuehne-trustable-de.
the class CertificateUtilIntTest method testBuildCertificateWithSAN.
@Test
public void testBuildCertificateWithSAN() throws GeneralSecurityException, IOException {
String executionId = "";
Certificate cert = certificateUtil.createCertificate(testCertWithSAN, null, executionId);
assertNotNull(cert);
assertFalse(cert.getSans().isEmpty());
assertEquals("ca@trustable.de", cert.getSans());
boolean sanPresent = false;
for (CertificateAttribute certAtt : cert.getCertificateAttributes()) {
if (CertificateAttribute.ATTRIBUTE_SAN.equals(certAtt.getName())) {
assertEquals("ca@trustable.de", certAtt.getValue());
System.out.println("::: " + certAtt.getValue());
sanPresent = true;
}
}
assertTrue(sanPresent);
}
Aggregations