Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
f5cbf8fb
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f5cbf8fb
编写于
3月 18, 2008
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes for S/MIME consistency checker and flexibility enhancements.
上级
7d7e640e
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
35 addition
and
24 deletion
+35
-24
test/cms-test.pl
test/cms-test.pl
+35
-24
未找到文件。
test/cms-test.pl
浏览文件 @
f5cbf8fb
...
@@ -53,11 +53,25 @@
...
@@ -53,11 +53,25 @@
# CMS, PKCS7 consistency test script. Run extensive tests on
# CMS, PKCS7 consistency test script. Run extensive tests on
# OpenSSL PKCS#7 and CMS implementations.
# OpenSSL PKCS#7 and CMS implementations.
my
$ossl_path
;
my
$ossl_path
=
"
../apps/openssl
";
if
(
-
f
"
../apps/openssl
"
)
{
my
$cmd
=
"
$ossl_path
cms
";
$ossl_path
=
"
../util/shlib_wrap.sh ../apps/openssl
";
my
$cmd2
=
"
$ossl_path
smime
";
}
elsif
(
-
f
"
..
\\
out32dll
\\
openssl.exe
"
)
{
$ossl_path
=
"
..
\\
out32dll
\\
openssl.exe
";
}
elsif
(
-
f
"
..
\\
out32
\\
openssl.exe
"
)
{
$ossl_path
=
"
..
\\
out32
\\
openssl.exe
";
}
else
{
die
"
Can't find OpenSSL executable
";
}
my
$pk7cmd
=
"
$ossl_path
smime
";
my
$cmscmd
=
"
$ossl_path
cms
";
my
$smdir
=
"
smime-certs
";
my
$smdir
=
"
smime-certs
";
my
$halt_err
=
1
;
my
$badcmd
=
0
;
my
$badcmd
=
0
;
...
@@ -73,7 +87,6 @@ my @smime_pkcs7_tests = (
...
@@ -73,7 +87,6 @@ my @smime_pkcs7_tests = (
[
[
"
signed detached content DER format, RSA key
",
"
signed detached content DER format, RSA key
",
"
-sign -in smcont.txt -outform DER
"
"
-sign -in smcont.txt -outform DER
"
.
"
-signer
$smdir
/smrsa1.pem -out test.cms
",
.
"
-signer
$smdir
/smrsa1.pem -out test.cms
",
"
-verify -in test.cms -inform DER
"
"
-verify -in test.cms -inform DER
"
...
@@ -98,7 +111,6 @@ my @smime_pkcs7_tests = (
...
@@ -98,7 +111,6 @@ my @smime_pkcs7_tests = (
[
[
"
signed detached content DER format, DSA key
",
"
signed detached content DER format, DSA key
",
"
-sign -in smcont.txt -outform DER
"
"
-sign -in smcont.txt -outform DER
"
.
"
-signer
$smdir
/smdsa1.pem -out test.cms
",
.
"
-signer
$smdir
/smdsa1.pem -out test.cms
",
"
-verify -in test.cms -inform DER
"
"
-verify -in test.cms -inform DER
"
...
@@ -107,7 +119,6 @@ my @smime_pkcs7_tests = (
...
@@ -107,7 +119,6 @@ my @smime_pkcs7_tests = (
[
[
"
signed detached content DER format, add RSA signer
",
"
signed detached content DER format, add RSA signer
",
"
-resign -inform DER -in test.cms -outform DER
"
"
-resign -inform DER -in test.cms -outform DER
"
.
"
-signer
$smdir
/smrsa1.pem -out test2.cms
",
.
"
-signer
$smdir
/smrsa1.pem -out test2.cms
",
"
-verify -in test2.cms -inform DER
"
"
-verify -in test2.cms -inform DER
"
...
@@ -148,8 +159,7 @@ my @smime_pkcs7_tests = (
...
@@ -148,8 +159,7 @@ my @smime_pkcs7_tests = (
.
"
-signer
$smdir
/smrsa1.pem -signer
$smdir
/smrsa2.pem
"
.
"
-signer
$smdir
/smrsa1.pem -signer
$smdir
/smrsa2.pem
"
.
"
-signer
$smdir
/smdsa1.pem -signer
$smdir
/smdsa2.pem
"
.
"
-signer
$smdir
/smdsa1.pem -signer
$smdir
/smdsa2.pem
"
.
"
-stream -out test.cms
",
.
"
-stream -out test.cms
",
"
-verify -in test.cms
"
"
-verify -in test.cms
"
.
"
-CAfile
$smdir
/smroot.pem -out smtst.txt
"
.
"
-CAfile
$smdir
/smroot.pem -out smtst.txt
"
],
],
[
[
...
@@ -158,8 +168,7 @@ my @smime_pkcs7_tests = (
...
@@ -158,8 +168,7 @@ my @smime_pkcs7_tests = (
.
"
-signer
$smdir
/smrsa1.pem -signer
$smdir
/smrsa2.pem
"
.
"
-signer
$smdir
/smrsa1.pem -signer
$smdir
/smrsa2.pem
"
.
"
-signer
$smdir
/smdsa1.pem -signer
$smdir
/smdsa2.pem
"
.
"
-signer
$smdir
/smdsa1.pem -signer
$smdir
/smdsa2.pem
"
.
"
-stream -out test.cms
",
.
"
-stream -out test.cms
",
"
-verify -in test.cms
"
"
-verify -in test.cms
"
.
"
-CAfile
$smdir
/smroot.pem -out smtst.txt
"
.
"
-CAfile
$smdir
/smroot.pem -out smtst.txt
"
],
],
[
[
...
@@ -277,19 +286,19 @@ my @smime_cms_comp_tests = (
...
@@ -277,19 +286,19 @@ my @smime_cms_comp_tests = (
print
"
CMS => PKCS#7 compatibility tests
\n
";
print
"
CMS => PKCS#7 compatibility tests
\n
";
run_smime_tests
(
\
$badcmd
,
\
@smime_pkcs7_tests
,
$cm
d
,
$cmd2
);
run_smime_tests
(
\
$badcmd
,
\
@smime_pkcs7_tests
,
$cm
scmd
,
$pk7cmd
);
print
"
CMS <= PKCS#7 compatibility tests
\n
";
print
"
CMS <= PKCS#7 compatibility tests
\n
";
run_smime_tests
(
\
$badcmd
,
\
@smime_pkcs7_tests
,
$
cmd2
,
$
cmd
);
run_smime_tests
(
\
$badcmd
,
\
@smime_pkcs7_tests
,
$
pk7cmd
,
$cms
cmd
);
print
"
CMS <=> CMS consistency tests
\n
";
print
"
CMS <=> CMS consistency tests
\n
";
run_smime_tests
(
\
$badcmd
,
\
@smime_pkcs7_tests
,
$cm
d
,
$
cmd
);
run_smime_tests
(
\
$badcmd
,
\
@smime_pkcs7_tests
,
$cm
scmd
,
$cms
cmd
);
run_smime_tests
(
\
$badcmd
,
\
@smime_cms_tests
,
$cm
d
,
$
cmd
);
run_smime_tests
(
\
$badcmd
,
\
@smime_cms_tests
,
$cm
scmd
,
$cms
cmd
);
if
(
`
$ossl_path
version -f
`
=~
/ZLIB/
)
{
if
(
`
$ossl_path
version -f
`
=~
/ZLIB/
)
{
run_smime_tests
(
\
$badcmd
,
\
@smime_cms_comp_tests
,
$cm
d
,
$
cmd
);
run_smime_tests
(
\
$badcmd
,
\
@smime_cms_comp_tests
,
$cm
scmd
,
$cms
cmd
);
}
}
else
{
else
{
print
"
Zlib not supported: compression tests skipped
\n
";
print
"
Zlib not supported: compression tests skipped
\n
";
...
@@ -311,12 +320,14 @@ sub run_smime_tests {
...
@@ -311,12 +320,14 @@ sub run_smime_tests {
if
(
$?
)
{
if
(
$?
)
{
print
"
$tnam
: generation error
\n
";
print
"
$tnam
: generation error
\n
";
$$rv
++
;
$$rv
++
;
exit
1
if
$halt_err
;
next
;
next
;
}
}
system
(
$vcmd
.
$rvcmd
);
system
(
$vcmd
.
$rvcmd
);
if
(
$?
)
{
if
(
$?
)
{
print
"
$tnam
: verify error
\n
";
print
"
$tnam
: verify error
\n
";
$$rv
++
;
$$rv
++
;
exit
1
if
$halt_err
;
next
;
next
;
}
}
print
"
$tnam
: OK
\n
";
print
"
$tnam
: OK
\n
";
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录