Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
b8dc172b
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看板
提交
b8dc172b
编写于
7月 19, 2013
作者:
A
ascarpino
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8012971: PKCS11Test hiding exception failures
Reviewed-by: vinnie, valeriep
上级
30061542
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
45 addition
and
11 deletion
+45
-11
test/ProblemList.txt
test/ProblemList.txt
+17
-0
test/sun/security/pkcs11/PKCS11Test.java
test/sun/security/pkcs11/PKCS11Test.java
+27
-11
test/sun/security/pkcs11/SecmodTest.java
test/sun/security/pkcs11/SecmodTest.java
+1
-0
未找到文件。
test/ProblemList.txt
浏览文件 @
b8dc172b
...
...
@@ -255,6 +255,23 @@ sun/rmi/transport/proxy/EagerHttpFallback.java generic-all
# jdk_security
# 8012971 PKCS11Test hiding exception failures
sun/security/pkcs11/KeyStore/SecretKeysBasic.java solaris-all
sun/security/pkcs11/KeyStore/SecretKeysBasic.java linux-all
sun/security/pkcs11/ec/TestCurves.java solaris-all
sun/security/pkcs11/ec/TestCurves.java linux-all
sun/security/pkcs11/ec/TestECDH.java solaris-all
sun/security/pkcs11/ec/TestECDH2.java solaris-all
sun/security/pkcs11/ec/TestECDH2.java linux-all
sun/security/pkcs11/ec/TestECDSA.java solaris-all
sun/security/pkcs11/ec/TestECDSA.java linux-all
sun/security/pkcs11/ec/TestECDSA2.java solaris-all
sun/security/pkcs11/ec/TestECDSA2.java linux-all
sun/security/pkcs11/ec/TestECGenSpec.java solaris-all
sun/security/pkcs11/ec/TestECGenSpec.java linux-all
sun/security/pkcs11/ec/TestKeyFactory.java solaris-all
sun/security/pkcs11/ec/TestKeyFactory.java linux-all
# 7164518: no PortUnreachableException on Mac
sun/security/krb5/auto/Unreachable.java macosx-all
...
...
test/sun/security/pkcs11/PKCS11Test.java
浏览文件 @
b8dc172b
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -54,6 +54,11 @@ public abstract class PKCS11Test {
static
String
NSPR_PREFIX
=
""
;
// The NSS library we need to search for in getNSSLibDir()
// Default is "libsoftokn3.so", listed as "softokn3"
// The other is "libnss3.so", listed as "nss3".
static
String
nss_library
=
"softokn3"
;
static
Provider
getSunPKCS11
(
String
config
)
throws
Exception
{
Class
clazz
=
Class
.
forName
(
"sun.security.pkcs11.SunPKCS11"
);
Constructor
cons
=
clazz
.
getConstructor
(
new
Class
[]
{
String
.
class
});
...
...
@@ -79,24 +84,28 @@ public abstract class PKCS11Test {
testNSS
(
test
);
testDeimos
(
test
);
}
finally
{
// NOTE: Do not place a 'return' in any finally block
// as it will suppress exceptions and hide test failures.
Provider
[]
newProviders
=
Security
.
getProviders
();
boolean
found
=
true
;
// Do not restore providers if nothing changed. This is especailly
// useful for ./Provider/Login.sh, where a SecurityManager exists.
if
(
oldProviders
.
length
==
newProviders
.
length
)
{
boolean
found
=
false
;
found
=
false
;
for
(
int
i
=
0
;
i
<
oldProviders
.
length
;
i
++)
{
if
(
oldProviders
[
i
]
!=
newProviders
[
i
])
{
found
=
true
;
break
;
}
}
if
(!
found
)
return
;
}
for
(
Provider
p:
newProviders
)
{
Security
.
removeProvider
(
p
.
getName
());
}
for
(
Provider
p:
oldProviders
)
{
Security
.
addProvider
(
p
);
if
(
found
)
{
for
(
Provider
p:
newProviders
)
{
Security
.
removeProvider
(
p
.
getName
());
}
for
(
Provider
p:
oldProviders
)
{
Security
.
addProvider
(
p
);
}
}
}
}
...
...
@@ -178,7 +187,8 @@ public abstract class PKCS11Test {
}
String
nssLibDir
=
null
;
for
(
String
dir
:
nssLibDirs
)
{
if
(
new
File
(
dir
).
exists
())
{
if
(
new
File
(
dir
).
exists
()
&&
new
File
(
dir
+
System
.
mapLibraryName
(
nss_library
)).
exists
())
{
nssLibDir
=
dir
;
System
.
setProperty
(
"pkcs11test.nss.libdir"
,
nssLibDir
);
break
;
...
...
@@ -207,6 +217,11 @@ public abstract class PKCS11Test {
return
true
;
}
// Used to set the nss_library file to search for libsoftokn3.so
public
static
void
useNSS
()
{
nss_library
=
"nss3"
;
}
public
static
void
testNSS
(
PKCS11Test
test
)
throws
Exception
{
String
libdir
=
getNSSLibDir
();
if
(
libdir
==
null
)
{
...
...
@@ -218,7 +233,7 @@ public abstract class PKCS11Test {
return
;
}
String
libfile
=
libdir
+
System
.
mapLibraryName
(
"softokn3"
);
String
libfile
=
libdir
+
System
.
mapLibraryName
(
nss_library
);
String
customDBdir
=
System
.
getProperty
(
"CUSTOM_DB_DIR"
);
String
dbdir
=
(
customDBdir
!=
null
)
?
...
...
@@ -252,7 +267,8 @@ public abstract class PKCS11Test {
osMap
.
put
(
"Linux-i386-32"
,
new
String
[]{
"/usr/lib/i386-linux-gnu/"
,
"/usr/lib/"
});
osMap
.
put
(
"Linux-amd64-64"
,
new
String
[]{
"/usr/lib/x86_64-linux-gnu/"
,
"/usr/lib64/"
});
"/usr/lib/x86_64-linux-gnu/"
,
"/usr/lib/x86_64-linux-gnu/nss/"
,
"/usr/lib64/"
});
osMap
.
put
(
"Windows-x86-32"
,
new
String
[]{
PKCS11_BASE
+
"/nss/lib/windows-i586/"
.
replace
(
'/'
,
SEP
)});
osMap
.
put
(
"Windows-amd64-64"
,
new
String
[]{
...
...
test/sun/security/pkcs11/SecmodTest.java
浏览文件 @
b8dc172b
...
...
@@ -36,6 +36,7 @@ public class SecmodTest extends PKCS11Test {
static
String
keyAlias
=
"mykey"
;
static
boolean
initSecmod
()
throws
Exception
{
useNSS
();
LIBPATH
=
getNSSLibDir
();
if
(
LIBPATH
==
null
)
{
return
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录