Java Jetty支持SoapUI的TLS 1.2请求

Java Jetty支持SoapUI的TLS 1.2请求,java,jetty,soapui,embedded-jetty,tls1.2,Java,Jetty,Soapui,Embedded Jetty,Tls1.2,我正在努力构建一个能够接受TLSv1.2请求的嵌入式Jetty服务器 这是Java代码: private void launchHttpsListener() { Server server = new Server(new InetSocketAddress(m_sAddress, m_nPort)); SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setKeyStorePa

我正在努力构建一个能够接受TLSv1.2请求的嵌入式Jetty服务器

这是Java代码:

private void launchHttpsListener() {

Server server = new Server(new InetSocketAddress(m_sAddress, m_nPort));

SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setKeyStorePath("./keystore.jks");
sslContextFactory.setKeyStorePassword("Aa123456");
sslContextFactory.setKeyManagerPassword("Aa123456");
//sslContextFactory.setProtocol("TLSv1.2");
//sslContextFactory.setIncludeProtocols("TLSv1.2");

// Setup HTTP Configuration
HttpConfiguration httpConf = new HttpConfiguration();
httpConf.setSecurePort(m_nPort);
httpConf.setSecureScheme("https");
httpConf.addCustomizer(new SecureRequestCustomizer());

ContextHandler contextHandler = new ContextHandler();
contextHandler.setContextPath("/Service");
contextHandler.setHandler(new JettyServiceHandler());

ContextHandlerCollection contextHandlers = new ContextHandlerCollection();
contextHandlers.setHandlers(new Handler[] { contextHandler });

ServerConnector serverConnector = new ServerConnector(server,
    new SslConnectionFactory(sslContextFactory,"http/1.1"),
    new HttpConnectionFactory(httpConf));

serverConnector.setPort(m_nPort);

server.setConnectors(new Connector[]  { serverConnector });
server.setHandler(contextHandlers);

try {
    server.start();

    Log4jWrapper.writeLog(LogLevelEnum.INFO, "[-----------------] <JettyServiceListener> launchHttpsListener",
            "HTTPS Listener on " + m_sAddress + ":" + m_nPort);

    server.join();
} catch (InterruptedException e) {

    Log4jWrapper.writeLog(LogLevelEnum.ERROR, "[-----------------] <JettyServiceListener> launchHttpsListener",
            e.getMessage());
} catch (Exception e) {

    Log4jWrapper.writeLog(LogLevelEnum.ERROR, "[-----------------] <JettyServiceListener> launchHttpsListener",
            e.getMessage());
}
我哪里出错了


谢谢

找到了丢失的链接

我补充说:

    sslContextFactory.setExcludeCipherSuites("SSL_RSA_WITH_DES_CBC_SHA",
                "SSL_DHE_RSA_WITH_DES_CBC_SHA", 
                "SSL_DHE_DSS_WITH_DES_CBC_SHA",
                "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
                "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
                "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
               "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA");

例外消失了

注意:排除列表与TLS支持级别无关。事实上,现代浏览器实际上不支持*\u RSA*\u SHA匹配密码,在这种情况下没有任何意义。
-Dsoapui.https.protocols=TLSv1.2
    sslContextFactory.setExcludeCipherSuites("SSL_RSA_WITH_DES_CBC_SHA",
                "SSL_DHE_RSA_WITH_DES_CBC_SHA", 
                "SSL_DHE_DSS_WITH_DES_CBC_SHA",
                "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
                "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
                "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
               "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA");