Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
120905e6
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看板
提交
120905e6
编写于
10月 20, 2008
作者:
W
weijun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6761072: new krb5 tests fail on multiple platforms
Reviewed-by: xuelei
上级
7e8658f2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
6 deletion
+31
-6
test/sun/security/krb5/auto/BasicKrb5Test.java
test/sun/security/krb5/auto/BasicKrb5Test.java
+5
-2
test/sun/security/krb5/auto/KDC.java
test/sun/security/krb5/auto/KDC.java
+9
-2
test/sun/security/krb5/auto/OneKDC.java
test/sun/security/krb5/auto/OneKDC.java
+17
-2
未找到文件。
test/sun/security/krb5/auto/BasicKrb5Test.java
浏览文件 @
120905e6
...
...
@@ -49,14 +49,17 @@ public class BasicKrb5Test {
if
(
args
.
length
>
0
)
{
etype
=
args
[
0
];
}
// Creates and starts the KDC. This line must be put ahead of etype check
// since the check needs a krb5.conf.
new
OneKDC
(
etype
).
writeJAASConf
();
System
.
out
.
println
(
"Testing etype "
+
etype
);
if
(
etype
!=
null
&&
!
EType
.
isSupported
(
Config
.
getInstance
().
getType
(
etype
)))
{
System
.
out
.
println
(
"Not supported."
);
System
.
exit
(
0
);
}
// Creates and starts the KDC
new
OneKDC
(
etype
).
writeJAASConf
();
new
BasicKrb5Test
().
go
(
OneKDC
.
SERVER
,
OneKDC
.
BACKEND
);
}
...
...
test/sun/security/krb5/auto/KDC.java
浏览文件 @
120905e6
...
...
@@ -152,12 +152,19 @@ public class KDC {
return
;
}
}
String
localhost
=
"localhost"
;
try
{
localhost
=
InetAddress
.
getByName
(
localhost
)
.
getCanonicalHostName
();
}
catch
(
UnknownHostException
uhe
)
{
;
// Ignore, localhost is still "localhost"
}
KDC
kdc
=
create
(
"RABBIT.HOLE"
,
8888
,
false
);
kdc
.
addPrincipal
(
"dummy"
,
"bogus"
.
toCharArray
());
kdc
.
addPrincipal
(
"foo"
,
"bar"
.
toCharArray
());
kdc
.
addPrincipalRandKey
(
"krbtgt/"
+
kdc
.
realm
);
kdc
.
addPrincipalRandKey
(
"server/
localhost"
);
kdc
.
addPrincipalRandKey
(
"backend/
localhost"
);
kdc
.
addPrincipalRandKey
(
"server/
"
+
localhost
);
kdc
.
addPrincipalRandKey
(
"backend/
"
+
localhost
);
}
/**
...
...
test/sun/security/krb5/auto/OneKDC.java
浏览文件 @
120905e6
...
...
@@ -24,6 +24,8 @@
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.security.Security
;
import
javax.security.auth.callback.Callback
;
import
javax.security.auth.callback.CallbackHandler
;
...
...
@@ -44,10 +46,23 @@ import sun.security.krb5.Config;
*/
public
class
OneKDC
extends
KDC
{
// The krb5 codes would try to canonicalize hostnames before creating
// a service principal name, so let's find out the canonicalized form
// of localhost first. The following codes mimic the process inside
// PrincipalName.java.
static
String
localhost
=
"localhost"
;
static
{
try
{
localhost
=
InetAddress
.
getByName
(
localhost
)
.
getCanonicalHostName
();
}
catch
(
UnknownHostException
uhe
)
{
;
// Ignore, localhost is still "localhost"
}
}
public
static
final
String
USER
=
"dummy"
;
public
static
final
char
[]
PASS
=
"bogus"
.
toCharArray
();
public
static
final
String
SERVER
=
"server/localhost"
;
public
static
final
String
BACKEND
=
"backend/localhost"
;
public
static
String
SERVER
=
"server/"
+
localhost
;
public
static
String
BACKEND
=
"backend/"
+
localhost
;
public
static
final
String
KRB5_CONF
=
"localkdc-krb5.conf"
;
public
static
final
String
KTAB
=
"localkdc.ktab"
;
public
static
final
String
JAAS_CONF
=
"localkdc-jaas.conf"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录