Https - TLSv1.2

大于8k左右的数据请求(PUT/POST)无法与server通信

[b]Chrome: Error (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.[/b]

public class ShortBufferException extends GeneralSecurityException
This exception is thrown when an output buffer provided by the user is too short to hold the operation result.

Tomcat 8.0
disable TLS1.2

<Connector SSLEnabled="true" 
clientAuth="false"
connectionLinger="0"
...
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https"
secure="true"
sslProtocol="TLS"
sslEnabledProtocols="TLSv1,TLSv1.1,TLS1.2,SSLv2Hello" />


<Connector SSLEnabled="true" 
clientAuth="false"
connectionLinger="0"
...
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https"
secure="true"
sslProtocol="TLS"
sslEnabledProtocols="TLSv1,TLSv1.1,SSLv2Hello" />



HTTPS connector parameter sslProtocol defines which SSL/TLS protocols
are enabled by default, e.g. for Oracle JDK 7:

1) setProtocol="TLS" will enable SSLv3 and TLSv1
2) setProtocol="TLSv1.2" will enable SSLv3, TLSv1, TLSv1.1 and TLS v1.2
3) setProtocol="TLSv1.1" will enable SSLv3, TLSv1, and TLSv1.1
4) setProtocol="TLSv1" will enable SSLv3 and TLSv1
5) setProtocol="SSL" will enable SSLv3 and TLSv1
6) setProtocol="SSLv3" will enable SSLv3 and TLSv1
7) setProtocol="SSLv2" won't work

So, in order to restrict available protocols only to TLSv1.1, you need
to add parameter sslEnabledProtocols="TLSv1.1" to your connector.

Note that even if some protocol is not enabled by default, you may
enable it by specifying sslEnabledProtocols parameter. E.g.

sslProtocol="SSL" sslEnabledProtocols="TLSv1.1"

is somewhat confusing, but perfectly legal.


参考:
[url]https://bugs.openjdk.java.net/browse/JDK-8036970[/url]

[url]https://www.ssl.com/how-to/turn-off-ssl-3-0-and-tls-1-0-in-your-browser/[/url]
[url]http://docs.oracle.com/javase/8/docs/api/javax/crypto/ShortBufferException.html[/url]
[url]http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SSLContext[/url]
[url]http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7031830[/url]
[url]http://mail-archives.apache.org/mod_mbox/tomcat-users/201303.mbox/%3C13A085B2E018374C813676301AED0EE412D87457C3@BLR0EXC00.us.sonicwall.com%3E[/url]
[url]https://technet.microsoft.com/en-us/library/cc783349(v=ws.10).aspx[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值