Java 如何在Jetty中禁用SSLv3协议以防止贵宾犬攻击
是否存在仅禁用SSLv3密码而非TLSv1/2的特定排除列表 我有jetty 8,现在不能升级到9。我当前的jetty-ssl.xml如下所示Java 如何在Jetty中禁用SSLv3协议以防止贵宾犬攻击,java,security,ssl,jetty,Java,Security,Ssl,Jetty,是否存在仅禁用SSLv3密码而非TLSv1/2的特定排除列表 我有jetty 8,现在不能升级到9。我当前的jetty-ssl.xml如下所示 <Configure id="Server" class="org.eclipse.jetty.server.Server"> <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ssl.SslSele
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Arg>
<New class="org.eclipse.jetty.http.ssl.SslContextFactory">
.........
</New>
</Arg>
<Set name="ExcludeCipherSuites">
<Array type="java.lang.String">
<Item>SSL_RSA_WITH_NULL_MD5</Item>
<Item>SSL_RSA_WITH_NULL_SHA</Item>
<Item>SSL_RSA_EXPORT_WITH_RC4_40_MD5</Item>
<Item>SSL_RSA_WITH_RC4_128_MD5</Item>
<Item>SSL_RSA_WITH_RC4_128_SHA</Item>
<Item>SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5</Item>
<Item>SSL_RSA_WITH_IDEA_CBC_SHA</Item>
<Item>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_RSA_WITH_DES_CBC_SHA</Item>
<Item>SSL_RSA_WITH_3DES_EDE_CBC_SHA</Item>
<Item>SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_DH_DSS_WITH_DES_CBC_SHA</Item>
<Item>SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA</Item>
<Item>SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_DH_RSA_WITH_DES_CBC_SHA</Item>
<Item>SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA</Item>
<Item>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_DHE_DSS_WITH_DES_CBC_SHA</Item>
<Item>SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA</Item>
<Item>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_DHE_RSA_WITH_DES_CBC_SHA</Item>
<Item>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</Item>
<Item>SSL_DH_anon_EXPORT_WITH_RC4_40_MD5</Item>
<Item>SSL_DH_anon_WITH_RC4_128_MD5</Item>
<Item>SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_DH_anon_WITH_DES_CBC_SHA</Item>
<Item>SSL_DH_anon_WITH_3DES_EDE_CBC_SHA</Item>
<Item>SSL_FORTEZZA_KEA_WITH_NULL_SHA</Item>
<Item>SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA</Item>
<Item>SSL_FORTEZZA_KEA_WITH_RC4_128_SHA</Item>
<Item>SSL_DHE_RSA_WITH_AES_128_CBC_SHA</Item>
<Item>SSL_RSA_WITH_AES_128_CBC_SHA</Item>
</Array>
</Set>
</New>
</Arg>
</Call>
我不得不在集成Jetty源代码的应用程序中禁用SSLv3。根据我在代码中所做的更改,我猜您添加了以下内容:
<Set name="ExcludeProtocols">
<Array type="java.lang.String">
<Item>SSLv3</Item>
</Array>
</Set>
SSLv3
试一试,并让我知道它是否适合您。来扩展@Lars answer 对于Jetty 7、Jetty 8和Jetty 9,您必须在用于配置基于SSL的连接器的任何
SslContextFactory
上排除协议SSLv3
(而不是密码)
对于码头配送
编辑${jetty.home}/etc/jetty ssl.xml
并添加以下xml片段
SSLv3
在管理org.eclipse.jetty.http.ssl.SslContextFactory的任何元素内部
对于嵌入式码头
您为基于SSL的连接器创建/管理的任何SslContextFactory只需设置排除的协议
SslContextFactory SslContextFactory=new SslContextFactory();
sslContextFactory.addExcludeProtocols(“SSLv3”);
setkeystrepath(…);
...
我已经配置了Jetty 8.1,没有ssl3。您可以看到jetty-ssl.xml的完整结构
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Arg>
<New class="org.eclipse.jetty.http.ssl.SslContextFactory">
<Set name="keyStore">... </Set>
<Set name="keyStorePassword">... </Set>
<Set name="keyManagerPassword">... </Set>
<Set name="trustStore">... </Set>
<Set name="trustStorePassword>... </Set
<Set name="ExcludeProtocols">
<Array type="java.lang.String">
<Item>SSLv3 </Item>
</Array>
</Set>
</New>
</Arg>
<Set name="port">... </Set>
<Set name="maxIdleTime">... </Set>
</New>
</Arg>
</Call>
</Configure>
...
...
...
...
在Jetty上打开了一个新的bug,从Jetty 9.3开始默认禁用了SSLv3-请更新您的答案,说明此配置适用于SslContextFactory,适用于Jetty 7/8/9(刚刚测试了所有3个,并且有效)我仍然坚持使用Jetty v6(由于仍然基于Eclipse 3.7),我该如何在那里做到这一点?sslContextFactory.addExcludeProtocols()不存在…Jetty 6不支持此功能。很抱歉您必须制作自己的SslSocketConnector。参见Karl对另一个问题的回答,了解一些示例代码库——顺便说一句,Jetty 6在2010年是EOL,自那时起就没有漏洞修复。Poodle只是它缺少修复的数百个漏洞中的一个(如果在Windows上使用Jetty乘以3)。强烈建议升级,或者不要在公共互联网上运行Jetty 6。@centic这里有一个Eclipse端错误,跟踪Eclipse本身升级到Jetty 9的过程-是的,我知道它已经过时了,不幸的是,升级Eclipse是一项主要工作,对于已经交付给许多客户的软件来说不是一个选项。我们通过在SslSocketConnector上注册LivecycleListener并在那里访问和调整新创建的ServerSocket找到了解决方法。
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Arg>
<New class="org.eclipse.jetty.http.ssl.SslContextFactory">
<Set name="keyStore">... </Set>
<Set name="keyStorePassword">... </Set>
<Set name="keyManagerPassword">... </Set>
<Set name="trustStore">... </Set>
<Set name="trustStorePassword>... </Set
<Set name="ExcludeProtocols">
<Array type="java.lang.String">
<Item>SSLv3 </Item>
</Array>
</Set>
</New>
</Arg>
<Set name="port">... </Set>
<Set name="maxIdleTime">... </Set>
</New>
</Arg>
</Call>
</Configure>