Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
ba6d7cd0
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ba6d7cd0
编写于
8月 13, 2012
作者:
V
vinnie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7190945: pkcs11 problem loading NSS libs on Ubuntu
Reviewed-by: xuelei, alanb
上级
e043ee93
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
36 addition
and
19 deletion
+36
-19
src/share/classes/sun/security/pkcs11/Secmod.java
src/share/classes/sun/security/pkcs11/Secmod.java
+11
-2
test/sun/security/pkcs11/PKCS11Test.java
test/sun/security/pkcs11/PKCS11Test.java
+25
-17
test/sun/security/pkcs11/Secmod/keystore.jks
test/sun/security/pkcs11/Secmod/keystore.jks
+0
-0
未找到文件。
src/share/classes/sun/security/pkcs11/Secmod.java
浏览文件 @
ba6d7cd0
/*
* Copyright (c) 2005, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
2
, 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
...
...
@@ -405,7 +405,16 @@ public final class Secmod {
+
"module: "
+
libraryName
+
", "
+
commonName
);
}
}
this
.
libraryName
=
(
new
File
(
libraryDir
,
libraryName
)).
getPath
();
// On Ubuntu the libsoftokn3 library is located in a subdirectory
// of the system libraries directory. (Since Ubuntu 11.04.)
File
libraryFile
=
new
File
(
libraryDir
,
libraryName
);
if
(!
libraryFile
.
isFile
())
{
File
failover
=
new
File
(
libraryDir
,
"nss/"
+
libraryName
);
if
(
failover
.
isFile
())
{
libraryFile
=
failover
;
}
}
this
.
libraryName
=
libraryFile
.
getPath
();
this
.
commonName
=
commonName
;
this
.
slot
=
slot
;
this
.
type
=
type
;
...
...
test/sun/security/pkcs11/PKCS11Test.java
浏览文件 @
ba6d7cd0
...
...
@@ -167,17 +167,23 @@ public abstract class PKCS11Test {
}
String
osid
=
osName
+
"-"
+
props
.
getProperty
(
"os.arch"
)
+
"-"
+
props
.
getProperty
(
"sun.arch.data.model"
);
String
nssLibDir
=
osMap
.
get
(
osid
);
if
(
nssLibDir
==
null
)
{
String
[]
nssLibDirs
=
osMap
.
get
(
osid
);
if
(
nssLibDir
s
==
null
)
{
System
.
out
.
println
(
"Unsupported OS, skipping: "
+
osid
);
return
null
;
// throw new Exception("Unsupported OS " + osName);
}
if
(
nssLibDir
.
length
()
==
0
)
{
if
(
nssLibDir
s
.
length
==
0
)
{
System
.
out
.
println
(
"NSS not supported on this platform, skipping test"
);
return
null
;
}
String
nssLibDir
=
null
;
for
(
String
dir
:
nssLibDirs
)
{
if
(
new
File
(
dir
).
exists
())
{
nssLibDir
=
dir
;
System
.
setProperty
(
"pkcs11test.nss.libdir"
,
nssLibDir
);
break
;
}
}
return
nssLibDir
;
}
...
...
@@ -234,21 +240,23 @@ public abstract class PKCS11Test {
}
private
static
final
Map
<
String
,
String
>
osMap
;
private
static
final
Map
<
String
,
String
[]
>
osMap
;
// Location of the NSS libraries on each supported platform
static
{
osMap
=
new
HashMap
<
String
,
String
>();
osMap
.
put
(
"SunOS-sparc-32"
,
"/usr/lib/mps/"
);
osMap
.
put
(
"SunOS-sparcv9-64"
,
"/usr/lib/mps/64/"
);
osMap
.
put
(
"SunOS-x86-32"
,
"/usr/lib/mps/"
);
osMap
.
put
(
"SunOS-amd64-64"
,
"/usr/lib/mps/64/"
);
osMap
.
put
(
"Linux-i386-32"
,
"/usr/lib/"
);
osMap
.
put
(
"Linux-amd64-64"
,
"/usr/lib64/"
);
osMap
.
put
(
"Windows-x86-32"
,
PKCS11_BASE
+
"/nss/lib/windows-i586/"
.
replace
(
'/'
,
SEP
));
osMap
.
put
(
"Windows-amd64-64"
,
PKCS11_BASE
+
"/nss/lib/windows-amd64/"
.
replace
(
'/'
,
SEP
));
osMap
=
new
HashMap
<
String
,
String
[]>();
osMap
.
put
(
"SunOS-sparc-32"
,
new
String
[]{
"/usr/lib/mps/"
});
osMap
.
put
(
"SunOS-sparcv9-64"
,
new
String
[]{
"/usr/lib/mps/64/"
});
osMap
.
put
(
"SunOS-x86-32"
,
new
String
[]{
"/usr/lib/mps/"
});
osMap
.
put
(
"SunOS-amd64-64"
,
new
String
[]{
"/usr/lib/mps/64/"
});
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/"
});
osMap
.
put
(
"Windows-x86-32"
,
new
String
[]{
PKCS11_BASE
+
"/nss/lib/windows-i586/"
.
replace
(
'/'
,
SEP
)});
osMap
.
put
(
"Windows-amd64-64"
,
new
String
[]{
PKCS11_BASE
+
"/nss/lib/windows-amd64/"
.
replace
(
'/'
,
SEP
)});
}
private
final
static
char
[]
hexDigits
=
"0123456789abcdef"
.
toCharArray
();
...
...
test/sun/security/pkcs11/Secmod/keystore.jks
浏览文件 @
ba6d7cd0
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录