Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
Dragonwell11
提交
632a1682
D
Dragonwell11
项目概览
LinuxSuRen
/
Dragonwell11
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
632a1682
编写于
11月 25, 2019
作者:
X
xuelei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8234408: Improve TLS session handling
Reviewed-by: ascarpino, jjiang, ahgross, ssahoo, mullan, andrew
上级
632b36cb
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
4 addition
and
18 deletion
+4
-18
src/java.base/share/classes/sun/security/ssl/ClientHello.java
...java.base/share/classes/sun/security/ssl/ClientHello.java
+1
-1
src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java
...a.base/share/classes/sun/security/ssl/SSLSessionImpl.java
+1
-15
src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java
...va.base/share/classes/sun/security/ssl/SSLSocketImpl.java
+1
-1
src/java.base/share/classes/sun/security/ssl/TransportContext.java
...base/share/classes/sun/security/ssl/TransportContext.java
+1
-1
未找到文件。
src/java.base/share/classes/sun/security/ssl/ClientHello.java
浏览文件 @
632a1682
...
@@ -407,7 +407,7 @@ final class ClientHello {
...
@@ -407,7 +407,7 @@ final class ClientHello {
ProtocolVersion
maxProtocolVersion
=
chc
.
maximumActiveProtocol
;
ProtocolVersion
maxProtocolVersion
=
chc
.
maximumActiveProtocol
;
// session ID of the ClientHello message
// session ID of the ClientHello message
SessionId
sessionId
=
SSLSessionImpl
.
nullSession
.
getSessionId
(
);
SessionId
sessionId
=
new
SessionId
(
new
byte
[
0
]
);
// a list of cipher suites sent by the client
// a list of cipher suites sent by the client
List
<
CipherSuite
>
cipherSuites
=
chc
.
activeCipherSuites
;
List
<
CipherSuite
>
cipherSuites
=
chc
.
activeCipherSuites
;
...
...
src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java
浏览文件 @
632a1682
...
@@ -67,11 +67,6 @@ import javax.net.ssl.SSLSessionContext;
...
@@ -67,11 +67,6 @@ import javax.net.ssl.SSLSessionContext;
*/
*/
final
class
SSLSessionImpl
extends
ExtendedSSLSession
{
final
class
SSLSessionImpl
extends
ExtendedSSLSession
{
/*
* we only really need a single null session
*/
static
final
SSLSessionImpl
nullSession
=
new
SSLSessionImpl
();
/*
/*
* The state of a single session, as described in section 7.1
* The state of a single session, as described in section 7.1
* of the SSLv3 spec.
* of the SSLv3 spec.
...
@@ -141,7 +136,7 @@ final class SSLSessionImpl extends ExtendedSSLSession {
...
@@ -141,7 +136,7 @@ final class SSLSessionImpl extends ExtendedSSLSession {
* be used either by a client or by a server, as a connection is
* be used either by a client or by a server, as a connection is
* first opened and before handshaking begins.
* first opened and before handshaking begins.
*/
*/
private
SSLSessionImpl
()
{
SSLSessionImpl
()
{
this
.
protocolVersion
=
ProtocolVersion
.
NONE
;
this
.
protocolVersion
=
ProtocolVersion
.
NONE
;
this
.
cipherSuite
=
CipherSuite
.
C_NULL
;
this
.
cipherSuite
=
CipherSuite
.
C_NULL
;
this
.
sessionId
=
new
SessionId
(
false
,
null
);
this
.
sessionId
=
new
SessionId
(
false
,
null
);
...
@@ -777,15 +772,6 @@ final class SSLSessionImpl extends ExtendedSSLSession {
...
@@ -777,15 +772,6 @@ final class SSLSessionImpl extends ExtendedSSLSession {
*/
*/
@Override
@Override
public
synchronized
void
invalidate
()
{
public
synchronized
void
invalidate
()
{
//
// Can't invalidate the NULL session -- this would be
// attempted when we get a handshaking error on a brand
// new connection, with no "real" session yet.
//
if
(
this
==
nullSession
)
{
return
;
}
if
(
context
!=
null
)
{
if
(
context
!=
null
)
{
context
.
remove
(
sessionId
);
context
.
remove
(
sessionId
);
context
=
null
;
context
=
null
;
...
...
src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java
浏览文件 @
632a1682
...
@@ -334,7 +334,7 @@ public final class SSLSocketImpl
...
@@ -334,7 +334,7 @@ public final class SSLSocketImpl
SSLLogger
.
severe
(
"handshake failed"
,
ioe
);
SSLLogger
.
severe
(
"handshake failed"
,
ioe
);
}
}
return
SSLSessionImpl
.
nullSession
;
return
new
SSLSessionImpl
()
;
}
}
return
conContext
.
conSession
;
return
conContext
.
conSession
;
...
...
src/java.base/share/classes/sun/security/ssl/TransportContext.java
浏览文件 @
632a1682
...
@@ -131,7 +131,7 @@ class TransportContext implements ConnectionContext {
...
@@ -131,7 +131,7 @@ class TransportContext implements ConnectionContext {
this
.
isUnsureMode
=
isUnsureMode
;
this
.
isUnsureMode
=
isUnsureMode
;
// initial security parameters
// initial security parameters
this
.
conSession
=
SSLSessionImpl
.
nullSession
;
this
.
conSession
=
new
SSLSessionImpl
()
;
this
.
protocolVersion
=
this
.
sslConfig
.
maximumProtocolVersion
;
this
.
protocolVersion
=
this
.
sslConfig
.
maximumProtocolVersion
;
this
.
clientVerifyData
=
emptyByteArray
;
this
.
clientVerifyData
=
emptyByteArray
;
this
.
serverVerifyData
=
emptyByteArray
;
this
.
serverVerifyData
=
emptyByteArray
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录