Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
f2bc4e7b
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看板
提交
f2bc4e7b
编写于
11月 03, 2015
作者:
C
coffeys
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8141287: Add MD5 to jdk.certpath.disabledAlgorithms - Take 2
Reviewed-by: xuelei
上级
37b86e7f
变更
30
展开全部
隐藏空白更改
内联
并排
Showing
30 changed file
with
717 addition
and
70 deletion
+717
-70
src/share/lib/security/java.security-aix
src/share/lib/security/java.security-aix
+1
-1
src/share/lib/security/java.security-linux
src/share/lib/security/java.security-linux
+1
-1
src/share/lib/security/java.security-macosx
src/share/lib/security/java.security-macosx
+1
-1
src/share/lib/security/java.security-solaris
src/share/lib/security/java.security-solaris
+1
-1
src/share/lib/security/java.security-windows
src/share/lib/security/java.security-windows
+1
-1
test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java
...ty/cert/CertPathBuilder/selfIssued/DisableRevocation.java
+11
-1
test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java
...rity/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java
+11
-1
test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java
...cert/CertPathBuilder/selfIssued/StatusLoopDependency.java
+11
-1
test/java/security/cert/CertPathValidator/OCSP/AIACheck.java
test/java/security/cert/CertPathValidator/OCSP/AIACheck.java
+12
-1
test/java/security/cert/CertPathValidator/OCSP/FailoverToCRL.java
...a/security/cert/CertPathValidator/OCSP/FailoverToCRL.java
+16
-4
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevel.java
...rt/CertPathValidator/indirectCRL/CircularCRLOneLevel.java
+12
-1
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevelRevoked.java
...PathValidator/indirectCRL/CircularCRLOneLevelRevoked.java
+12
-1
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java
...rt/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java
+12
-1
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java
...PathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java
+12
-1
test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java
test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java
+4
-0
test/sun/security/provider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java
...rovider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java
+449
-0
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/MD2InTrustAnchor.java
...net/ssl/internal/ssl/SSLContextImpl/MD2InTrustAnchor.java
+11
-4
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java
...net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java
+10
-4
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509KeyManager/PreferredKey.java
...sun/net/ssl/internal/ssl/X509KeyManager/PreferredKey.java
+12
-1
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/BasicConstraints.java
...l/internal/ssl/X509TrustManagerImpl/BasicConstraints.java
+11
-4
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/PKIXExtendedTM.java
...ssl/internal/ssl/X509TrustManagerImpl/PKIXExtendedTM.java
+10
-4
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SelfIssuedCert.java
...ssl/internal/ssl/X509TrustManagerImpl/SelfIssuedCert.java
+11
-4
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java
.../internal/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java
+11
-4
test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/CriticalSubjectAltName.java
...ocol/https/HttpsURLConnection/CriticalSubjectAltName.java
+14
-6
test/sun/security/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java
...y/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java
+6
-1
test/sun/security/ssl/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java
...ssl/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java
+10
-5
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
.../www/protocol/https/HttpsURLConnection/DNSIdentities.java
+11
-4
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java
...tocol/https/HttpsURLConnection/IPAddressIPIdentities.java
+11
-4
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java
...t/www/protocol/https/HttpsURLConnection/IPIdentities.java
+11
-4
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java
...net/www/protocol/https/HttpsURLConnection/Identities.java
+11
-4
未找到文件。
src/share/lib/security/java.security-aix
浏览文件 @
f2bc4e7b
...
@@ -481,7 +481,7 @@ krb5.kdc.bad.policy = tryLast
...
@@ -481,7 +481,7 @@ krb5.kdc.bad.policy = tryLast
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
#
#
#
#
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
jdk.certpath.disabledAlgorithms=MD2,
MD5,
RSA keySize < 1024
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# (SSL/TLS) processing
# (SSL/TLS) processing
...
...
src/share/lib/security/java.security-linux
浏览文件 @
f2bc4e7b
...
@@ -481,7 +481,7 @@ krb5.kdc.bad.policy = tryLast
...
@@ -481,7 +481,7 @@ krb5.kdc.bad.policy = tryLast
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
#
#
#
#
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
jdk.certpath.disabledAlgorithms=MD2,
MD5,
RSA keySize < 1024
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# (SSL/TLS) processing
# (SSL/TLS) processing
...
...
src/share/lib/security/java.security-macosx
浏览文件 @
f2bc4e7b
...
@@ -484,7 +484,7 @@ krb5.kdc.bad.policy = tryLast
...
@@ -484,7 +484,7 @@ krb5.kdc.bad.policy = tryLast
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
#
#
#
#
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
jdk.certpath.disabledAlgorithms=MD2,
MD5,
RSA keySize < 1024
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# (SSL/TLS) processing
# (SSL/TLS) processing
...
...
src/share/lib/security/java.security-solaris
浏览文件 @
f2bc4e7b
...
@@ -483,7 +483,7 @@ krb5.kdc.bad.policy = tryLast
...
@@ -483,7 +483,7 @@ krb5.kdc.bad.policy = tryLast
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
#
#
#
#
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
jdk.certpath.disabledAlgorithms=MD2,
MD5,
RSA keySize < 1024
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# (SSL/TLS) processing
# (SSL/TLS) processing
...
...
src/share/lib/security/java.security-windows
浏览文件 @
f2bc4e7b
...
@@ -484,7 +484,7 @@ krb5.kdc.bad.policy = tryLast
...
@@ -484,7 +484,7 @@ krb5.kdc.bad.policy = tryLast
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
#
#
#
#
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
jdk.certpath.disabledAlgorithms=MD2,
MD5,
RSA keySize < 1024
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
# (SSL/TLS) processing
# (SSL/TLS) processing
...
...
test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
* @bug 6852744
* @bug 6852744
...
@@ -234,6 +240,10 @@ public final class DisableRevocation {
...
@@ -234,6 +240,10 @@ public final class DisableRevocation {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPathBuilder
builder
=
CertPathBuilder
.
getInstance
(
"PKIX"
);
CertPathBuilder
builder
=
CertPathBuilder
.
getInstance
(
"PKIX"
);
X509CertSelector
selector
=
generateSelector
(
args
[
0
]);
X509CertSelector
selector
=
generateSelector
(
args
[
0
]);
...
...
test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
* @bug 6852744
* @bug 6852744
...
@@ -277,6 +283,10 @@ public final class KeyUsageMatters {
...
@@ -277,6 +283,10 @@ public final class KeyUsageMatters {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPathBuilder
builder
=
CertPathBuilder
.
getInstance
(
"PKIX"
);
CertPathBuilder
builder
=
CertPathBuilder
.
getInstance
(
"PKIX"
);
X509CertSelector
selector
=
generateSelector
(
args
[
0
]);
X509CertSelector
selector
=
generateSelector
(
args
[
0
]);
...
...
test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
* @bug 6852744
* @bug 6852744
...
@@ -283,6 +289,10 @@ public final class StatusLoopDependency {
...
@@ -283,6 +289,10 @@ public final class StatusLoopDependency {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPathBuilder
builder
=
CertPathBuilder
.
getInstance
(
"PKIX"
);
CertPathBuilder
builder
=
CertPathBuilder
.
getInstance
(
"PKIX"
);
X509CertSelector
selector
=
generateSelector
(
args
[
0
]);
X509CertSelector
selector
=
generateSelector
(
args
[
0
]);
...
...
test/java/security/cert/CertPathValidator/OCSP/AIACheck.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,12 +21,19 @@
...
@@ -21,12 +21,19 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
* @bug 5072953
* @bug 5072953
* @summary Verify that the URL for an OCSP responder can be extracted from a
* @summary Verify that the URL for an OCSP responder can be extracted from a
* certificate's AuthorityInfoAccess extension when OCSP certifiate
* certificate's AuthorityInfoAccess extension when OCSP certifiate
* validation has been enabled.
* validation has been enabled.
* @run main/othervm AIACheck
*/
*/
import
java.io.*
;
import
java.io.*
;
...
@@ -51,6 +58,10 @@ public class AIACheck {
...
@@ -51,6 +58,10 @@ public class AIACheck {
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
X509Certificate
aiaCert
=
loadCertificate
(
"AIACert.pem"
);
X509Certificate
aiaCert
=
loadCertificate
(
"AIACert.pem"
);
X509Certificate
rootCert
=
loadCertificate
(
"RootCert.pem"
);
X509Certificate
rootCert
=
loadCertificate
(
"RootCert.pem"
);
...
...
test/java/security/cert/CertPathValidator/OCSP/FailoverToCRL.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,16 +21,24 @@
...
@@ -21,16 +21,24 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
* @bug 6383095
* @bug 6383095
* @summary CRL revoked certificate failures masked by OCSP failures
* @summary CRL revoked certificate failures masked by OCSP failures
*
* @run main/othervm FailoverToCRL
* @author Xuelei Fan
*/
/*
* Note that the certificate validity is from Mar 16 14:55:35 2009 GMT to
* Note that the certificate validity is from Mar 16 14:55:35 2009 GMT to
* Dec 1 14:55:35 2028 GMT, please update it with newer certificate if
* Dec 1 14:55:35 2028 GMT, please update it with newer certificate if
* expires.
* expires.
*
* @author Xuelei Fan
*/
*/
/*
/*
...
@@ -229,6 +237,10 @@ public class FailoverToCRL {
...
@@ -229,6 +237,10 @@ public class FailoverToCRL {
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPath
path
=
generateCertificatePath
();
CertPath
path
=
generateCertificatePath
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
CertStore
crls
=
generateCertificateStore
();
CertStore
crls
=
generateCertificateStore
();
...
...
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevel.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,11 +21,18 @@
...
@@ -21,11 +21,18 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
*
*
* @bug 6720721
* @bug 6720721
* @summary CRL check with circular depency support needed
* @summary CRL check with circular depency support needed
* @run main/othervm CircularCRLOneLevel
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -158,6 +165,10 @@ public class CircularCRLOneLevel {
...
@@ -158,6 +165,10 @@ public class CircularCRLOneLevel {
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPath
path
=
generateCertificatePath
();
CertPath
path
=
generateCertificatePath
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
CertStore
crls
=
generateCertificateStore
();
CertStore
crls
=
generateCertificateStore
();
...
...
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevelRevoked.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,11 +21,18 @@
...
@@ -21,11 +21,18 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
*
*
* @bug 6720721
* @bug 6720721
* @summary CRL check with circular depency support needed
* @summary CRL check with circular depency support needed
* @run main/othervm CircularCRLOneLevelRevoked
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -159,6 +166,10 @@ public class CircularCRLOneLevelRevoked {
...
@@ -159,6 +166,10 @@ public class CircularCRLOneLevelRevoked {
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPath
path
=
generateCertificatePath
();
CertPath
path
=
generateCertificatePath
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
CertStore
crls
=
generateCertificateStore
();
CertStore
crls
=
generateCertificateStore
();
...
...
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,11 +21,18 @@
...
@@ -21,11 +21,18 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
*
*
* @bug 6720721
* @bug 6720721
* @summary CRL check with circular depency support needed
* @summary CRL check with circular depency support needed
* @run main/othervm CircularCRLTwoLevel
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -210,6 +217,10 @@ public class CircularCRLTwoLevel {
...
@@ -210,6 +217,10 @@ public class CircularCRLTwoLevel {
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPath
path
=
generateCertificatePath
();
CertPath
path
=
generateCertificatePath
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
CertStore
crls
=
generateCertificateStore
();
CertStore
crls
=
generateCertificateStore
();
...
...
test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,11 +21,18 @@
...
@@ -21,11 +21,18 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/**
/**
* @test
* @test
*
*
* @bug 6720721
* @bug 6720721
* @summary CRL check with circular depency support needed
* @summary CRL check with circular depency support needed
* @run main/othervm CircularCRLTwoLevelRevoked
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -211,6 +218,10 @@ public class CircularCRLTwoLevelRevoked {
...
@@ -211,6 +218,10 @@ public class CircularCRLTwoLevelRevoked {
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
CertPath
path
=
generateCertificatePath
();
CertPath
path
=
generateCertificatePath
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
Set
<
TrustAnchor
>
anchors
=
generateTrustAnchors
();
CertStore
crls
=
generateCertificateStore
();
CertStore
crls
=
generateCertificateStore
();
...
...
test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java
浏览文件 @
f2bc4e7b
...
@@ -57,6 +57,10 @@ public class ClientJSSEServerJSSE extends PKCS11Test {
...
@@ -57,6 +57,10 @@ public class ClientJSSEServerJSSE extends PKCS11Test {
}
}
public
void
main
(
Provider
p
)
throws
Exception
{
public
void
main
(
Provider
p
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
String
testWithoutSunEC
=
System
.
getProperty
(
"testWithoutSunEC"
);
String
testWithoutSunEC
=
System
.
getProperty
(
"testWithoutSunEC"
);
if
(
p
.
getService
(
"KeyFactory"
,
"EC"
)
==
null
)
{
if
(
p
.
getService
(
"KeyFactory"
,
"EC"
)
==
null
)
{
...
...
test/sun/security/provider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java
0 → 100644
浏览文件 @
f2bc4e7b
此差异已折叠。
点击以展开。
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/MD2InTrustAnchor.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,13 +23,15 @@
...
@@ -23,13 +23,15 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 7113275
* @bug 7113275
* @summary compatibility issue with MD2 trust anchor and old X509TrustManager
* @summary compatibility issue with MD2 trust anchor and old X509TrustManager
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @run main/othervm MD2InTrustAnchor PKIX TLSv1.1
* @run main/othervm MD2InTrustAnchor PKIX TLSv1.1
* @run main/othervm MD2InTrustAnchor SunX509 TLSv1.1
* @run main/othervm MD2InTrustAnchor SunX509 TLSv1.1
* @run main/othervm MD2InTrustAnchor PKIX TLSv1.2
* @run main/othervm MD2InTrustAnchor PKIX TLSv1.2
...
@@ -40,6 +42,7 @@ import java.net.*;
...
@@ -40,6 +42,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -283,6 +286,10 @@ public class MD2InTrustAnchor {
...
@@ -283,6 +286,10 @@ public class MD2InTrustAnchor {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,13 +23,15 @@
...
@@ -23,13 +23,15 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 7113275
* @bug 7113275
* @summary compatibility issue with MD2 trust anchor and old X509TrustManager
* @summary compatibility issue with MD2 trust anchor and old X509TrustManager
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @run main/othervm TrustTrustedCert PKIX TLSv1.1
* @run main/othervm TrustTrustedCert PKIX TLSv1.1
* @run main/othervm TrustTrustedCert SunX509 TLSv1.1
* @run main/othervm TrustTrustedCert SunX509 TLSv1.1
* @run main/othervm TrustTrustedCert PKIX TLSv1.2
* @run main/othervm TrustTrustedCert PKIX TLSv1.2
...
@@ -336,6 +338,10 @@ public class TrustTrustedCert {
...
@@ -336,6 +338,10 @@ public class TrustTrustedCert {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509KeyManager/PreferredKey.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005,
2014,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,11 +21,18 @@
...
@@ -21,11 +21,18 @@
* questions.
* questions.
*/
*/
//
// Security properties, once set, cannot revert to unset. To avoid
// conflicts with tests running in the same VM isolate this test by
// running it in otherVM mode.
//
/*
/*
* @test
* @test
* @bug 6302644
* @bug 6302644
* @summary X509KeyManager implementation for NewSunX509 doesn't return most
* @summary X509KeyManager implementation for NewSunX509 doesn't return most
* preferable key
* preferable key
* @run main/othervm PreferredKey
*/
*/
import
java.io.*
;
import
java.io.*
;
import
java.net.*
;
import
java.net.*
;
...
@@ -49,6 +56,10 @@ public class PreferredKey {
...
@@ -49,6 +56,10 @@ public class PreferredKey {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
KeyStore
ks
;
KeyStore
ks
;
KeyManagerFactory
kmf
;
KeyManagerFactory
kmf
;
X509KeyManager
km
;
X509KeyManager
km
;
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/BasicConstraints.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2012, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,14 +21,16 @@
...
@@ -21,14 +21,16 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 7166570
* @bug 7166570
* @summary JSSE certificate validation has started to fail for
* @summary JSSE certificate validation has started to fail for
* certificate chains
* certificate chains
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @run main/othervm BasicConstraints PKIX
* @run main/othervm BasicConstraints PKIX
* @run main/othervm BasicConstraints SunX509
* @run main/othervm BasicConstraints SunX509
*/
*/
...
@@ -37,6 +39,7 @@ import java.net.*;
...
@@ -37,6 +39,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.*
;
import
java.security.cert.*
;
...
@@ -454,6 +457,10 @@ public class BasicConstraints {
...
@@ -454,6 +457,10 @@ public class BasicConstraints {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/PKIXExtendedTM.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,21 +21,23 @@
...
@@ -21,21 +21,23 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 6916074
* @bug 6916074
* @summary Add support for TLS 1.2
* @summary Add support for TLS 1.2
* @run main/othervm PKIXExtendedTM
* @run main/othervm PKIXExtendedTM
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
*/
*/
import
java.net.*
;
import
java.net.*
;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -791,6 +793,10 @@ public class PKIXExtendedTM {
...
@@ -791,6 +793,10 @@ public class PKIXExtendedTM {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SelfIssuedCert.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2009, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,15 +21,17 @@
...
@@ -21,15 +21,17 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 6822460
* @bug 6822460
* @summary support self-issued certificate
* @summary support self-issued certificate
* @run main/othervm SelfIssuedCert PKIX
* @run main/othervm SelfIssuedCert PKIX
* @run main/othervm SelfIssuedCert SunX509
* @run main/othervm SelfIssuedCert SunX509
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -37,6 +39,7 @@ import java.net.*;
...
@@ -37,6 +39,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -302,6 +305,10 @@ public class SelfIssuedCert {
...
@@ -302,6 +305,10 @@ public class SelfIssuedCert {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,20 +21,23 @@
...
@@ -21,20 +21,23 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 6916074
* @bug 6916074
* @summary Add support for TLS 1.2
* @summary Add support for TLS 1.2
* @run main/othervm SunX509ExtendedTM
* @run main/othervm SunX509ExtendedTM
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
*/
*/
import
java.net.*
;
import
java.net.*
;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -792,6 +795,10 @@ public class SunX509ExtendedTM {
...
@@ -792,6 +795,10 @@ public class SunX509ExtendedTM {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/CriticalSubjectAltName.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2001, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,18 +21,21 @@
...
@@ -21,18 +21,21 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 6668231
* @bug 6668231
* @summary Presence of a critical subjectAltName causes JSSE's SunX509 to
* @summary Presence of a critical subjectAltName causes JSSE's SunX509 to
* fail trusted checks
* fail trusted checks
* @run main/othervm CriticalSubjectAltName
* @run main/othervm CriticalSubjectAltName
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
*
* @author Xuelei Fan
* @author Xuelei Fan
*
*/
/*
* This test depends on binary keystore, crisubn.jks and trusted.jks. Because
* This test depends on binary keystore, crisubn.jks and trusted.jks. Because
* JAVA keytool cannot generate X509 certificate with SubjectAltName extension,
* JAVA keytool cannot generate X509 certificate with SubjectAltName extension,
* the certificates are generated with openssl toolkits and then imported into
* the certificates are generated with openssl toolkits and then imported into
...
@@ -47,6 +50,7 @@
...
@@ -47,6 +50,7 @@
import
java.io.*
;
import
java.io.*
;
import
java.net.*
;
import
java.net.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
public
class
CriticalSubjectAltName
implements
HostnameVerifier
{
public
class
CriticalSubjectAltName
implements
HostnameVerifier
{
...
@@ -154,6 +158,10 @@ public class CriticalSubjectAltName implements HostnameVerifier {
...
@@ -154,6 +158,10 @@ public class CriticalSubjectAltName implements HostnameVerifier {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
String
keyFilename
=
String
keyFilename
=
System
.
getProperty
(
"test.src"
,
"./"
)
+
"/"
+
pathToStores
+
System
.
getProperty
(
"test.src"
,
"./"
)
+
"/"
+
pathToStores
+
"/"
+
keyStoreFile
;
"/"
+
keyStoreFile
;
...
...
test/sun/security/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2012, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -44,6 +44,7 @@ import java.net.*;
...
@@ -44,6 +44,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -431,6 +432,10 @@ public class SSLSocketSNISensitive {
...
@@ -431,6 +432,10 @@ public class SSLSocketSNISensitive {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,15 +23,16 @@
...
@@ -23,15 +23,16 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/*
/*
* @test
* @test
* @bug 4873188
* @bug 4873188
* @summary Support TLS 1.1
* @summary Support TLS 1.1
* @run main/othervm EmptyCertificateAuthorities
* @run main/othervm EmptyCertificateAuthorities
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
*
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -228,6 +229,10 @@ public class EmptyCertificateAuthorities {
...
@@ -228,6 +229,10 @@ public class EmptyCertificateAuthorities {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
String
keyFilename
=
String
keyFilename
=
System
.
getProperty
(
"test.src"
,
"."
)
+
"/"
+
pathToStores
+
System
.
getProperty
(
"test.src"
,
"."
)
+
"/"
+
pathToStores
+
"/"
+
keyStoreFile
;
"/"
+
keyStoreFile
;
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,13 +21,15 @@
...
@@ -21,13 +21,15 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/* @test
/* @test
* @bug 6766775
* @bug 6766775
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @run main/othervm DNSIdentities
* @run main/othervm DNSIdentities
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -35,6 +37,7 @@ import java.net.*;
...
@@ -35,6 +37,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -743,6 +746,10 @@ public class DNSIdentities {
...
@@ -743,6 +746,10 @@ public class DNSIdentities {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,13 +21,15 @@
...
@@ -21,13 +21,15 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/* @test
/* @test
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @bug 6766775
* @bug 6766775
* @run main/othervm IPAddressIPIdentities
* @run main/othervm IPAddressIPIdentities
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -35,6 +37,7 @@ import java.net.*;
...
@@ -35,6 +37,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -744,6 +747,10 @@ public class IPAddressIPIdentities {
...
@@ -744,6 +747,10 @@ public class IPAddressIPIdentities {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,13 +21,15 @@
...
@@ -21,13 +21,15 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/* @test
/* @test
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @bug 6766775
* @bug 6766775
* @run main/othervm IPIdentities
* @run main/othervm IPIdentities
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -35,6 +37,7 @@ import java.net.*;
...
@@ -35,6 +37,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -743,6 +746,10 @@ public class IPIdentities {
...
@@ -743,6 +746,10 @@ public class IPIdentities {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java
浏览文件 @
f2bc4e7b
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -21,13 +21,15 @@
...
@@ -21,13 +21,15 @@
* questions.
* questions.
*/
*/
//
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
//
/* @test
/* @test
* @bug 6766775
* @bug 6766775
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @summary X509 certificate hostname checking is broken in JDK1.6.0_10
* @run main/othervm Identities
* @run main/othervm Identities
*
* SunJSSE does not support dynamic system properties, no way to re-use
* system properties in samevm/agentvm mode.
* @author Xuelei Fan
* @author Xuelei Fan
*/
*/
...
@@ -35,6 +37,7 @@ import java.net.*;
...
@@ -35,6 +37,7 @@ import java.net.*;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.security.Security
;
import
java.security.KeyStore
;
import
java.security.KeyStore
;
import
java.security.KeyFactory
;
import
java.security.KeyFactory
;
import
java.security.cert.Certificate
;
import
java.security.cert.Certificate
;
...
@@ -743,6 +746,10 @@ public class Identities {
...
@@ -743,6 +746,10 @@ public class Identities {
volatile
Exception
clientException
=
null
;
volatile
Exception
clientException
=
null
;
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
if
(
debug
)
if
(
debug
)
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
System
.
setProperty
(
"javax.net.debug"
,
"all"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录