X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fclub%2Fwpia%2Fgigi%2FLauncher.java;h=c5e43ce62bce338b5791c3b80d2b13bd29bcbb12;hb=321275b98020a0bc4e26369296cc60fb85c15c23;hp=b4ae8e2ae007168cdea9affa4c3fd5e4e0a538a4;hpb=42222135161915d0e6e05264b3b3aa652af599d0;p=gigi.git diff --git a/src/club/wpia/gigi/Launcher.java b/src/club/wpia/gigi/Launcher.java index b4ae8e2a..c5e43ce6 100644 --- a/src/club/wpia/gigi/Launcher.java +++ b/src/club/wpia/gigi/Launcher.java @@ -58,7 +58,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory; 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; @@ -272,19 +272,12 @@ public class Launcher { 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); } @@ -306,7 +299,7 @@ public class Launcher { 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); } @@ -395,6 +388,15 @@ public class Launcher { 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; + } } }