Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
c0e0b6ca
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c0e0b6ca
编写于
5月 04, 2012
作者:
X
xuelei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7153184: NullPointerException when calling SSLEngineImpl.getSupportedCipherSuites
Reviewed-by: weijun
上级
ad3bbfba
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
14 deletion
+29
-14
src/share/classes/sun/security/ssl/SSLContextImpl.java
src/share/classes/sun/security/ssl/SSLContextImpl.java
+29
-14
未找到文件。
src/share/classes/sun/security/ssl/SSLContextImpl.java
浏览文件 @
c0e0b6ca
...
@@ -267,12 +267,15 @@ public abstract class SSLContextImpl extends SSLContextSpi {
...
@@ -267,12 +267,15 @@ public abstract class SSLContextImpl extends SSLContextSpi {
// Get suported CipherSuiteList.
// Get suported CipherSuiteList.
CipherSuiteList
getSuportedCipherSuiteList
()
{
CipherSuiteList
getSuportedCipherSuiteList
()
{
// Clear cache of available ciphersuites.
// The maintenance of cipher suites needs to be synchronized.
clearAvailableCache
();
synchronized
(
this
)
{
// Clear cache of available ciphersuites.
if
(
supportedCipherSuiteList
==
null
)
{
clearAvailableCache
();
supportedCipherSuiteList
=
getApplicableCipherSuiteList
(
getSuportedProtocolList
(),
false
);
if
(
supportedCipherSuiteList
==
null
)
{
supportedCipherSuiteList
=
getApplicableCipherSuiteList
(
getSuportedProtocolList
(),
false
);
}
}
}
return
supportedCipherSuiteList
;
return
supportedCipherSuiteList
;
...
@@ -280,20 +283,29 @@ public abstract class SSLContextImpl extends SSLContextSpi {
...
@@ -280,20 +283,29 @@ public abstract class SSLContextImpl extends SSLContextSpi {
// Get default CipherSuiteList.
// Get default CipherSuiteList.
CipherSuiteList
getDefaultCipherSuiteList
(
boolean
roleIsServer
)
{
CipherSuiteList
getDefaultCipherSuiteList
(
boolean
roleIsServer
)
{
// Clear cache of available ciphersuites.
clearAvailableCache
();
if
(
roleIsServer
)
{
if
(
roleIsServer
)
{
if
(
defaultServerCipherSuiteList
==
null
)
{
// The maintenance of cipher suites needs to be synchronized.
defaultServerCipherSuiteList
=
getApplicableCipherSuiteList
(
synchronized
(
this
)
{
// Clear cache of available ciphersuites.
clearAvailableCache
();
if
(
defaultServerCipherSuiteList
==
null
)
{
defaultServerCipherSuiteList
=
getApplicableCipherSuiteList
(
getDefaultProtocolList
(
true
),
true
);
getDefaultProtocolList
(
true
),
true
);
}
}
}
return
defaultServerCipherSuiteList
;
return
defaultServerCipherSuiteList
;
}
else
{
}
else
{
if
(
defaultClientCipherSuiteList
==
null
)
{
// The maintenance of cipher suites needs to be synchronized
defaultClientCipherSuiteList
=
getApplicableCipherSuiteList
(
synchronized
(
this
)
{
// Clear cache of available ciphersuites.
clearAvailableCache
();
if
(
defaultClientCipherSuiteList
==
null
)
{
defaultClientCipherSuiteList
=
getApplicableCipherSuiteList
(
getDefaultProtocolList
(
false
),
true
);
getDefaultProtocolList
(
false
),
true
);
}
}
}
return
defaultClientCipherSuiteList
;
return
defaultClientCipherSuiteList
;
...
@@ -364,8 +376,11 @@ public abstract class SSLContextImpl extends SSLContextSpi {
...
@@ -364,8 +376,11 @@ public abstract class SSLContextImpl extends SSLContextSpi {
* Clear cache of available ciphersuites. If we support all ciphers
* Clear cache of available ciphersuites. If we support all ciphers
* internally, there is no need to clear the cache and calling this
* internally, there is no need to clear the cache and calling this
* method has no effect.
* method has no effect.
*
* Note that every call to clearAvailableCache() and the maintenance of
* cipher suites need to be synchronized with this instance.
*/
*/
synchronized
void
clearAvailableCache
()
{
private
void
clearAvailableCache
()
{
if
(
CipherSuite
.
DYNAMIC_AVAILABILITY
)
{
if
(
CipherSuite
.
DYNAMIC_AVAILABILITY
)
{
supportedCipherSuiteList
=
null
;
supportedCipherSuiteList
=
null
;
defaultServerCipherSuiteList
=
null
;
defaultServerCipherSuiteList
=
null
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录