Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
582ff3f7
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看板
提交
582ff3f7
编写于
12月 03, 2012
作者:
W
weijun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7198507: [TEST_BUG] sun/security/tools/keytool/console.sh should be rewritten
Reviewed-by: xuelei
上级
390a2806
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
87 addition
and
48 deletion
+87
-48
test/sun/security/tools/keytool/console.sh
test/sun/security/tools/keytool/console.sh
+87
-48
未找到文件。
test/sun/security/tools/keytool/console.sh
浏览文件 @
582ff3f7
...
@@ -31,62 +31,101 @@
...
@@ -31,62 +31,101 @@
# @run shell/manual console.sh
# @run shell/manual console.sh
if
[
"
$ALT_PASS
"
=
""
]
;
then
if
[
"
$ALT_PASS
"
=
""
]
;
then
export
PASS
=
äö
äöäöäö
PASSW
=
äöäöäö
else
else
export
PASS
=
$ALT_PASS
PASSW
=
$ALT_PASS
fi
fi
echo
"ATTENTION"
KS
=
/tmp/kkk.
$$
echo
"==============================================================="
cat
<<
____
ATTENTION
===============================================================
This test is about non-ASCII password input compatibility between
JDK 5.0 and later versions. Before running the test, make sure that --
\$
J5 points to a JDK 5.0 installation
\$
JM points to the current installation
The password string used in this test is
$PASSW
. If you find difficulty
entering it in in your system, feel free to change it to something else
by providing
\$
ALT_PASS. It should be no less than 6 characters and include
some non-ASCII characters.
For each test, type into the characters as described in the test header.
<R> means the RETURN (or ENTER key). Please wait for a little while
after <R> is pressed each time.
\$
J5 is now
$J5
\$
JM is now
$JM
____
if
[
"
$J5
"
=
""
-o
"
$JM
"
=
""
]
;
then
echo
"Define
\$
J5 and
\$
JM first"
exit
1
fi
echo
"Press ENTER to start the test, or Ctrl-C to stop it"
read
x
echo
echo
echo
"This test is about console password input compatibility between"
echo
"=========================================="
echo
"Tiger and Mustang. Before running the test, make sure that --"
echo
"Test #1: 5->6, non-prompt. Please type <R>"
echo
"
\$
J5 points to a JDK 5.0 installation"
echo
"=========================================="
echo
"
\$
JM points to a JDK 6 installation"
.
echo
echo
echo
"The password string used in this test is
$PASS
. If you find difficulty"
rm
$KS
2> /dev/null
echo
"entering it in in your system, feel free to change it to something else"
$J5
/bin/keytool
-keystore
$KS
-genkey
-dname
CN
=
olala
-storepass
$PASSW
||
exit
1
echo
"by providing
\$
ALT_PASS (should be not less than 6 characters)"
$JM
/bin/keytool
-keystore
$KS
-list
-storepass
$PASSW
||
exit
2
echo
"=========================================="
echo
"Test #2: 6->5, non-prompt. Please type <R>"
echo
"=========================================="
echo
echo
echo
"For all prompt of
\"
Enter keystore password
\"
, type
$PASS
and press ENTER"
echo
"For all prompt of
\"
Enter key password for <mykey> (RETURN if same as keystore password)
\"
, press ENTER"
rm
$KS
2> /dev/null
echo
"If you see both the prompts appear, say --"
$JM
/bin/keytool
-keystore
$KS
-genkey
-dname
CN
=
olala
-storepass
$PASSW
||
exit
3
echo
" Enter key password for <mykey>"
$J5
/bin/keytool
-keystore
$KS
-list
-storepass
$PASSW
||
exit
4
echo
" (RETURN if same as keystore password): Enter keystore password:"
echo
"only response to the last prompt by typing
$PASS
and press ENTER"
echo
"============================================================"
echo
"Test #3: 5->6, prompt. Please type
$PASSW
<R> <R>
$PASSW
<R>"
echo
"============================================================"
echo
echo
echo
"Only if all the command run correctly without showing any error "
echo
"or warning, this test passes."
rm
$KS
2> /dev/null
$J5
/bin/keytool
-keystore
$KS
-genkey
-dname
CN
=
olala
||
exit
5
$JM
/bin/keytool
-keystore
$KS
-list
||
exit
6
echo
$PASSW
|
$J5
/bin/keytool
-keystore
$KS
-list
||
exit
7
echo
$PASSW
|
$JM
/bin/keytool
-keystore
$KS
-list
||
exit
8
echo
"======================================================================="
echo
"Test #4: 6->5, prompt. Please type
$PASSW
<R>
$PASSW
<R> <R>
$PASSW
<R>"
echo
"======================================================================="
echo
echo
echo
"Press ENTER to start the test, or Ctrl-C to stop it"
read
rm
$KS
2> /dev/null
$JM
/bin/keytool
-keystore
$KS
-genkey
-dname
CN
=
olala
||
exit
9
$J5
/bin/keytool
-keystore
$KS
-list
||
exit
10
echo
$PASSW
|
$JM
/bin/keytool
-keystore
$KS
-list
||
exit
11
echo
$PASSW
|
$J5
/bin/keytool
-keystore
$KS
-list
||
exit
12
echo
"==========================================="
echo
"Test #5: 5->6, pipe. Please type
$PASSW
<R>"
echo
"==========================================="
echo
rm
$KS
2> /dev/null
echo
$PASSW
|
$J5
/bin/keytool
-keystore
$KS
-genkey
-dname
CN
=
olala
||
exit
13
$JM
/bin/keytool
-keystore
$KS
-list
||
exit
14
echo
$PASSW
|
$J5
/bin/keytool
-keystore
$KS
-list
||
exit
15
echo
$PASSW
|
$JM
/bin/keytool
-keystore
$KS
-list
||
exit
16
rm
$KS
2> /dev/null
echo
echo
echo
"Test #1: 5->6, non-prompt"
echo
"Success"
rm
kkk
$J5
/bin/keytool
-keystore
kkk
-genkey
-dname
CN
=
olala
-storepass
$PASS
$JM
/bin/keytool
-keystore
kkk
-list
-storepass
$PASS
echo
"Test #2: 6->5, non-prompt"
rm
kkk
$JM
/bin/keytool
-keystore
kkk
-genkey
-dname
CN
=
olala
-storepass
$PASS
$J5
/bin/keytool
-keystore
kkk
-list
-storepass
$PASS
echo
"Test #3: 5->6, prompt"
rm
kkk
$J5
/bin/keytool
-keystore
kkk
-genkey
-dname
CN
=
olala
$JM
/bin/keytool
-keystore
kkk
-list
echo
$PASS
|
$J5
/bin/keytool
-keystore
kkk
-list
echo
$PASS
|
$JM
/bin/keytool
-keystore
kkk
-list
echo
"Test #4: 6->5, prompt"
rm
kkk
$JM
/bin/keytool
-keystore
kkk
-genkey
-dname
CN
=
olala
$J5
/bin/keytool
-keystore
kkk
-list
echo
$PASS
|
$JM
/bin/keytool
-keystore
kkk
-list
echo
$PASS
|
$J5
/bin/keytool
-keystore
kkk
-list
echo
"Test #5: 5->6, pipe"
rm
kkk
echo
$PASS
|
$J5
/bin/keytool
-keystore
kkk
-genkey
-dname
CN
=
olala
$JM
/bin/keytool
-keystore
kkk
-list
echo
$PASS
|
$J5
/bin/keytool
-keystore
kkk
-list
echo
$PASS
|
$JM
/bin/keytool
-keystore
kkk
-list
rm
kkk
exit
0
exit
0
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录