use of org.apache.cxf.xkms.model.xkms.ValidateRequestType in project cxf by apache.
the class X509UtilsTest method extractValidatingCertsOK.
@Test
@org.junit.Ignore
public void extractValidatingCertsOK() throws JAXBException {
InputStream is = this.getClass().getResourceAsStream("/validateRequestOK.xml");
@SuppressWarnings("unchecked") JAXBElement<ValidateRequestType> request = (JAXBElement<ValidateRequestType>) unmarshaller.unmarshal(is);
List<X509Certificate> certs = ValidateRequestParser.parse(request.getValue());
Assert.assertEquals("Exactly one certificate should be found", 1, certs.size());
Assert.assertEquals("Unexcpected certificate DN", CERT_DN, certs.get(0).getSubjectDN().getName());
}
Aggregations