import club.wpia.gigi.api.GigiAPI;
import club.wpia.gigi.email.EmailProvider;
import club.wpia.gigi.natives.SetUID;
-import club.wpia.gigi.util.CipherInfo;
+import club.wpia.gigi.ocsp.OCSPResponder;
import club.wpia.gigi.util.PEM;
import club.wpia.gigi.util.ServerConstants;
import club.wpia.gigi.util.ServerConstants.Host;
private static SslContextFactory generateSSLContextFactory(GigiConfig conf, String alias) throws GeneralSecurityException, IOException {
SslContextFactory scf = new SslContextFactory() {
- String[] ciphers = null;
-
@Override
public void customize(SSLEngine sslEngine) {
super.customize(sslEngine);
SSLParameters ssl = sslEngine.getSSLParameters();
ssl.setUseCipherSuitesOrder(true);
- if (ciphers == null) {
- ciphers = CipherInfo.filter(sslEngine.getSupportedCipherSuites());
- }
-
- ssl.setCipherSuites(ciphers);
sslEngine.setSSLParameters(ssl);
}
private void initHandlers() throws GeneralSecurityException, IOException {
HandlerList hl = new HandlerList();
hl.setHandlers(new Handler[] {
- ContextLauncher.generateStaticContext(), ContextLauncher.generateGigiContexts(conf.getMainProps(), conf.getTrustStore()), ContextLauncher.generateAPIContext()
+ ContextLauncher.generateStaticContext(), ContextLauncher.generateGigiContexts(conf.getMainProps(), conf.getTrustStore()), ContextLauncher.generateAPIContext(), ContextLauncher.generateOCSPContext()
});
s.setHandler(hl);
}
final ResourceHandler rh = generateResourceHandler();
rh.setResourceBase("static/www");
- HandlerWrapper hw = new PolicyRedirector();
+ HandlerWrapper hw = new HandlerWrapper();
hw.setHandler(rh);
ServletContextHandler servlet = new ServletContextHandler(ServletContextHandler.SESSIONS);
- servlet.setInitParameter(SessionManager.__SessionCookieProperty, "SomeCA-Session");
+ servlet.setInitParameter(SessionManager.__SessionCookieProperty, ServerConstants.getAppName() + "-Session");
servlet.addServlet(webAppServlet, "/*");
ErrorPageErrorHandler epeh = new ErrorPageErrorHandler();
epeh.addErrorPage(404, "/error");
return sch;
}
+ protected static Handler generateOCSPContext() {
+ ServletContextHandler sch = new ServletContextHandler();
+
+ sch.addVirtualHosts(new String[] {
+ ServerConstants.getHostName(Host.OCSP_RESPONDER)
+ });
+ sch.addServlet(new ServletHolder(new OCSPResponder()), "/*");
+ return sch;
+ }
}
}