use of org.xipki.ocsp.server.impl.HttpOcspServlet in project wildfly by wildfly.
the class TestingOcspServer method start.
public void start() throws Exception {
Assert.assertNull("OCSP server already started", ocspServer);
ocspServer = new OcspServer();
ocspServer.setConfFile(TestingOcspServer.class.getResource("ocsp-responder.xml").getFile());
securityFactory.setSignerFactoryRegister(new SignerFactoryRegisterImpl());
ocspServer.setSecurityFactory(securityFactory);
ocspServer.init();
HttpOcspServlet servlet = new HttpOcspServlet();
servlet.setServer(ocspServer);
server = new ClientAndServer(port);
server.when(request().withMethod("POST").withPath("/ocsp"), Times.unlimited()).respond(request -> getHttpResponse(request, servlet));
server.when(request().withMethod("GET").withPath("/ocsp/.*"), Times.unlimited()).respond(request -> getHttpResponse(request, servlet));
}
Aggregations