]> www.wagner.pp.ru Git - openssl-gost/engine.git/blob - tcl_tests/cmstc262019.try
tcl_tests: Add TCL tests files
[openssl-gost/engine.git] / tcl_tests / cmstc262019.try
1 #!/usr/bin/tclsh
2
3 lappend auto_path [file dirname [info script]]
4 package require ossltest
5 file delete -force $::test::dir/tc26_cms
6 file copy -force tc26_cms $::test::dir
7 cd $::test::dir
8
9 start_tests "CMS tests, TC26 examples"
10
11 #BUILD_AT=obj_mid.l64/ ./openssl_wrap.sh cms -verify -in ../standalone-test/tc26_cms/signed_a111.pem -inform PEM -noverify
12 #BUILD_AT=obj_mid.l64/ ./openssl_wrap.sh cms -verify -in ../standalone-test/tc26_cms/signed_a121.pem -inform PEM -noverify
13
14 test "Signed data, 512 bits, signed attributes" {
15         grep "Verification successful" [openssl "cms -verify -in tc26_cms/signed_a111.pem -inform PEM -noverify"]
16 } 0 "Verification successful
17 "
18
19 test "Signed data, 256 bits, no signed attributes" {
20         grep "Verification successful" [openssl "cms -verify -in tc26_cms/signed_a121.pem -inform PEM -noverify"]
21 } 0 "Verification successful
22 "
23
24 test "Digested data, 256 bits" {
25         grep "Verification successful" [openssl "cms -digest_verify -in tc26_cms/hashed_a311.pem -inform PEM -out hashed_a311.out"]
26 } 0 "Verification successful
27 "
28
29 test "Digested data, 512 bits" {
30         grep "Verification successful" [openssl "cms -digest_verify -in tc26_cms/hashed_a321.pem -inform PEM -out hashed_a321.out"]
31 } 0 "Verification successful
32 "
33
34 end_tests