Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
90ec4c0a
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
90ec4c0a
编写于
3月 18, 2008
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Delete tmp files, silence openssl commands, compare extracted content.
上级
52e9196d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
53 addition
and
2 deletion
+53
-2
test/cms-test.pl
test/cms-test.pl
+53
-2
未找到文件。
test/cms-test.pl
浏览文件 @
90ec4c0a
...
@@ -319,26 +319,77 @@ else {
...
@@ -319,26 +319,77 @@ else {
print
"
ALL TESTS SUCCESSFUL.
\n
";
print
"
ALL TESTS SUCCESSFUL.
\n
";
}
}
unlink
"
test.cms
";
unlink
"
test2.cms
";
unlink
"
smtst.txt
";
sub
run_smime_tests
{
sub
run_smime_tests
{
my
(
$rv
,
$aref
,
$scmd
,
$vcmd
)
=
@_
;
my
(
$rv
,
$aref
,
$scmd
,
$vcmd
)
=
@_
;
foreach
$smtst
(
@$aref
)
{
foreach
$smtst
(
@$aref
)
{
my
(
$tnam
,
$rscmd
,
$rvcmd
)
=
@$smtst
;
my
(
$tnam
,
$rscmd
,
$rvcmd
)
=
@$smtst
;
system
(
$scmd
.
$rscmd
);
system
(
"
$scmd$rscmd
2>cms.err 1>cms.out
"
);
if
(
$?
)
{
if
(
$?
)
{
print
"
$tnam
: generation error
\n
";
print
"
$tnam
: generation error
\n
";
$$rv
++
;
$$rv
++
;
exit
1
if
$halt_err
;
exit
1
if
$halt_err
;
next
;
next
;
}
}
system
(
$vcmd
.
$rvcmd
);
system
(
"
$vcmd$rvcmd
2>cms.err 1>cms.out
"
);
if
(
$?
)
{
if
(
$?
)
{
print
"
$tnam
: verify error
\n
";
print
"
$tnam
: verify error
\n
";
$$rv
++
;
$$rv
++
;
exit
1
if
$halt_err
;
exit
1
if
$halt_err
;
next
;
next
;
}
}
if
(
!
cmp_files
("
smtst.txt
",
"
smcont.txt
"))
{
print
"
$tnam
: content verify error
\n
";
$$rv
++
;
exit
1
if
$halt_err
;
next
;
}
print
"
$tnam
: OK
\n
";
print
"
$tnam
: OK
\n
";
}
}
}
}
sub
cmp_files
{
my
(
$f1
,
$f2
)
=
@_
;
my
(
$fp1
,
$fp2
);
my
(
$rd1
,
$rd2
);
if
(
!
open
(
$fp1
,
"
<
$f1
"
)
)
{
print
STDERR
"
Can't Open file
$f1
\n
";
return
0
;
}
if
(
!
open
(
$fp2
,
"
<
$f2
"
)
)
{
print
STDERR
"
Can't Open file
$f2
\n
";
return
0
;
}
binmode
$fp1
;
binmode
$fp2
;
my
$ret
=
0
;
for
(
;
;
)
{
$n1
=
sysread
$fp1
,
$rd1
,
4096
;
$n2
=
sysread
$fp2
,
$rd2
,
4096
;
last
if
(
$n1
!=
$n2
);
last
if
(
$rd1
ne
$rd2
);
if
(
$n1
==
0
)
{
$ret
=
1
;
last
;
}
}
close
$fp1
;
close
$fp2
;
return
$ret
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录