Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
dc241103
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dc241103
编写于
2月 16, 2006
作者:
U
Ulf Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wrap shlib for testtsa
Submitted by: David Somers <dsomers@omz13.com>
上级
b3e72fc3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
20 deletion
+23
-20
test/Makefile
test/Makefile
+1
-1
test/testtsa
test/testtsa
+22
-19
未找到文件。
test/Makefile
浏览文件 @
dc241103
...
...
@@ -287,7 +287,7 @@ test_aes: #$(AESTEST)
# ../util/shlib_wrap.sh ./$(AESTEST)
test_tsa
:
@
if
../apps/openssl no-rsa
;
then
\
@
if
../
util/shlib_wrap.sh ../
apps/openssl no-rsa
;
then
\
echo
"skipping testtsa test -- requires RSA"
;
\
else
\
sh ./testtsa
;
\
...
...
test/testtsa
浏览文件 @
dc241103
...
...
@@ -11,6 +11,9 @@ export SH PATH
OPENSSL_CONF
=
"../CAtsa.cnf"
export
OPENSSL_CONF
OPENSSL
=
"../util/opensslwrap.sh"
export
OPENSSL
error
()
{
echo
"ERROR DURING TSA TESTS!!!!!!!!!!!!!!!!"
>
&2
...
...
@@ -49,7 +52,7 @@ create_tsa_cert () {
INDEX
=
$1
EXT
=
$2
openssl req
-new
-out
tsa_req
${
INDEX
}
.pem
-keyout
tsa_key
${
INDEX
}
.pem
<<
EOF
../../util/shlib_wrap.sh ../../apps/
openssl req
-new
-out
tsa_req
${
INDEX
}
.pem
-keyout
tsa_key
${
INDEX
}
.pem
<<
EOF
HU
Budapest
Buda
...
...
@@ -58,7 +61,7 @@ tsa${INDEX}
EOF
test
$?
!=
0
&&
error
openssl ca
-in
tsa_req
${
INDEX
}
.pem
-out
tsa_cert
${
INDEX
}
.pem
\
../../util/shlib_wrap.sh ../../apps/
openssl ca
-in
tsa_req
${
INDEX
}
.pem
-out
tsa_cert
${
INDEX
}
.pem
\
-extensions
$EXT
<<
EOF
y
y
...
...
@@ -68,37 +71,37 @@ EOF
print_request
()
{
openssl ts
-query
-in
$1
-text
../../util/shlib_wrap.sh ../../apps/
openssl ts
-query
-in
$1
-text
}
create_time_stamp_request1
()
{
openssl ts
-query
-data
../testtsa
-policy
tsa_policy1
-cert
-out
req1.tsq
../../util/shlib_wrap.sh ../../apps/
openssl ts
-query
-data
../testtsa
-policy
tsa_policy1
-cert
-out
req1.tsq
test
$?
!=
0
&&
error
}
create_time_stamp_request2
()
{
openssl ts
-query
-data
../testtsa
-policy
tsa_policy2
-no_nonce
\
../../util/shlib_wrap.sh ../../apps/
openssl ts
-query
-data
../testtsa
-policy
tsa_policy2
-no_nonce
\
-out
req2.tsq
test
$?
!=
0
&&
error
}
create_time_stamp_request3
()
{
openssl ts
-query
-data
../CAtsa.cnf
-no_nonce
-out
req3.tsq
../../util/shlib_wrap.sh ../../apps/
openssl ts
-query
-data
../CAtsa.cnf
-no_nonce
-out
req3.tsq
test
$?
!=
0
&&
error
}
print_response
()
{
openssl ts
-reply
-in
$1
-text
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-in
$1
-text
test
$?
!=
0
&&
error
}
create_time_stamp_response
()
{
openssl ts
-reply
-section
$3
-queryfile
$1
-out
$2
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-section
$3
-queryfile
$1
-out
$2
test
$?
!=
0
&&
error
}
...
...
@@ -106,26 +109,26 @@ time_stamp_response_token_test () {
RESPONSE2
=
$2
.copy.tsr
TOKEN_DER
=
$2
.token.der
openssl ts
-reply
-in
$2
-out
$TOKEN_DER
-token_out
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-in
$2
-out
$TOKEN_DER
-token_out
test
$?
!=
0
&&
error
openssl ts
-reply
-in
$TOKEN_DER
-token_in
-out
$RESPONSE2
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-in
$TOKEN_DER
-token_in
-out
$RESPONSE2
test
$?
!=
0
&&
error
cmp
$RESPONSE2
$2
test
$?
!=
0
&&
error
openssl ts
-reply
-in
$2
-text
-token_out
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-in
$2
-text
-token_out
test
$?
!=
0
&&
error
openssl ts
-reply
-in
$TOKEN_DER
-token_in
-text
-token_out
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-in
$TOKEN_DER
-token_in
-text
-token_out
test
$?
!=
0
&&
error
openssl ts
-reply
-queryfile
$1
-text
-token_out
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-queryfile
$1
-text
-token_out
test
$?
!=
0
&&
error
}
verify_time_stamp_response
()
{
openssl ts
-verify
-queryfile
$1
-in
$2
-CAfile
demoCA/cacert.pem
\
../../util/shlib_wrap.sh ../../apps/
openssl ts
-verify
-queryfile
$1
-in
$2
-CAfile
demoCA/cacert.pem
\
-untrusted
tsa_cert1.pem
test
$?
!=
0
&&
error
openssl ts
-verify
-data
$3
-in
$2
-CAfile
demoCA/cacert.pem
\
../../util/shlib_wrap.sh ../../apps/
openssl ts
-verify
-data
$3
-in
$2
-CAfile
demoCA/cacert.pem
\
-untrusted
tsa_cert1.pem
test
$?
!=
0
&&
error
}
...
...
@@ -133,19 +136,19 @@ verify_time_stamp_response () {
verify_time_stamp_token
()
{
# create the token from the response first
openssl ts
-reply
-in
$2
-out
$2
.token
-token_out
../../util/shlib_wrap.sh ../../apps/
openssl ts
-reply
-in
$2
-out
$2
.token
-token_out
test
$?
!=
0
&&
error
openssl ts
-verify
-queryfile
$1
-in
$2
.token
-token_in
\
../../util/shlib_wrap.sh ../../apps/
openssl ts
-verify
-queryfile
$1
-in
$2
.token
-token_in
\
-CAfile
demoCA/cacert.pem
-untrusted
tsa_cert1.pem
test
$?
!=
0
&&
error
openssl ts
-verify
-data
$3
-in
$2
.token
-token_in
\
../../util/shlib_wrap.sh ../../apps/
openssl ts
-verify
-data
$3
-in
$2
.token
-token_in
\
-CAfile
demoCA/cacert.pem
-untrusted
tsa_cert1.pem
test
$?
!=
0
&&
error
}
verify_time_stamp_response_fail
()
{
openssl ts
-verify
-queryfile
$1
-in
$2
-CAfile
demoCA/cacert.pem
\
../../util/shlib_wrap.sh ../../apps/
openssl ts
-verify
-queryfile
$1
-in
$2
-CAfile
demoCA/cacert.pem
\
-untrusted
tsa_cert1.pem
# Checks if the verification failed, as it should have.
test
$?
==
0
&&
error
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录