Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
b73e00fc
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看板
提交
b73e00fc
编写于
2月 10, 2015
作者:
R
robm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8065553: Failed Java web start via IPv6 (Java7u71 or later)
Reviewed-by: xuelei
上级
c91f89eb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
0 deletion
+43
-0
src/share/classes/sun/security/util/HostnameChecker.java
src/share/classes/sun/security/util/HostnameChecker.java
+13
-0
test/sun/security/util/HostnameMatcher/TestHostnameChecker.java
...un/security/util/HostnameMatcher/TestHostnameChecker.java
+6
-0
test/sun/security/util/HostnameMatcher/cert5.crt
test/sun/security/util/HostnameMatcher/cert5.crt
+24
-0
未找到文件。
src/share/classes/sun/security/util/HostnameChecker.java
浏览文件 @
b73e00fc
...
...
@@ -26,6 +26,8 @@
package
sun.security.util
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.util.*
;
import
java.security.Principal
;
...
...
@@ -148,6 +150,17 @@ public class HostnameChecker {
String
ipAddress
=
(
String
)
next
.
get
(
1
);
if
(
expectedIP
.
equalsIgnoreCase
(
ipAddress
))
{
return
;
}
else
{
// compare InetAddress objects in order to ensure
// equality between a long IPv6 address and its
// abbreviated form.
try
{
if
(
InetAddress
.
getByName
(
expectedIP
).
equals
(
InetAddress
.
getByName
(
ipAddress
)))
{
return
;
}
}
catch
(
UnknownHostException
e
)
{
}
catch
(
SecurityException
e
)
{}
}
}
}
...
...
test/sun/security/util/HostnameMatcher/TestHostnameChecker.java
浏览文件 @
b73e00fc
...
...
@@ -187,6 +187,9 @@ public class TestHostnameChecker {
in
=
new
FileInputStream
(
new
File
(
PATH
,
"cert4.crt"
));
X509Certificate
cert4
=
(
X509Certificate
)
cf
.
generateCertificate
(
in
);
in
.
close
();
in
=
new
FileInputStream
(
new
File
(
PATH
,
"cert5.crt"
));
X509Certificate
cert5
=
(
X509Certificate
)
cf
.
generateCertificate
(
in
);
in
.
close
();
HostnameChecker
checker
=
HostnameChecker
.
getInstance
(
HostnameChecker
.
TYPE_TLS
);
...
...
@@ -202,6 +205,9 @@ public class TestHostnameChecker {
check
(
checker
,
"5.6.7.8"
,
cert3
,
true
);
check
(
checker
,
"foo.bar.com"
,
cert4
,
true
);
check
(
checker
,
"altfoo.bar.com"
,
cert4
,
true
);
check
(
checker
,
"2001:db8:3c4d:15::1a2f:1a2b"
,
cert5
,
true
);
check
(
checker
,
"2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b"
,
cert5
,
true
);
check
(
checker
,
"2002:db8:3c4d:15::1a2f:1a2b"
,
cert5
,
false
);
checker
=
HostnameChecker
.
getInstance
(
HostnameChecker
.
TYPE_LDAP
);
...
...
test/sun/security/util/HostnameMatcher/cert5.crt
0 → 100644
浏览文件 @
b73e00fc
-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgIJAJaBmuUlfY8sMA0GCSqGSIb3DQEBBQUAMIGmMQswCQYD
VQQGEwJVUzETMBEGA1UECAwKU29tZS1TdGF0ZTESMBAGA1UEBwwJU29tZS1DaXR5
MSowKAYDVQQKDCFVbmNvbmZpZ3VyZWQgT3BlblNTTCBJbnN0YWxsYXRpb24xEDAO
BgNVBAsMB3NlY3Rpb24xMDAuBgNVBAMMJzIwMDE6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oPV+r6/0qwnslScxVfszHxxFn1Yfsc5Oseare1MnlNzH69PmWs523C/fBvnB2
MsHKLPdoN7uSpBLB7j46g5jQG/ceri/cquZKYA==
-----END CERTIFICATE-----
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录