]> www.wagner.pp.ru Git - openssl-gost/engine.git/blob - tcl_tests/cmstc262019.try
tcl_tests: ca.try: Ignore openssl crl exit status for 'corrupted CRL' test
[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 set plain_str [getFile ./tc26_cms/plain/text_decrypted.plain]
9
10 start_tests "CMS tests, TC26 examples"
11
12 #BUILD_AT=obj_mid.l64/ ./openssl_wrap.sh cms -verify -in ../standalone-test/tc26_cms/signed_a111.pem -inform PEM -noverify
13 #BUILD_AT=obj_mid.l64/ ./openssl_wrap.sh cms -verify -in ../standalone-test/tc26_cms/signed_a121.pem -inform PEM -noverify
14
15 test "Signed data, 512 bits, signed attributes" {
16         grep "Verification successful" [openssl "cms -verify -in tc26_cms/signed_a111.pem -inform PEM -noverify"]
17 } 0 "CMS Verification successful
18 "
19
20 test "Signed data, 256 bits, no signed attributes" {
21         grep "Verification successful" [openssl "cms -verify -in tc26_cms/signed_a121.pem -inform PEM -noverify"]
22 } 0 "CMS Verification successful
23 "
24
25 test "Digested data, 256 bits" {
26         grep "Verification successful" [openssl "cms -digest_verify -in tc26_cms/hashed_a311.pem -inform PEM -out hashed_a311.out"]
27 } 0 "Verification successful
28 "
29
30 test "Digested data, 512 bits" {
31         grep "Verification successful" [openssl "cms -digest_verify -in tc26_cms/hashed_a321.pem -inform PEM -out hashed_a321.out"]
32 } 0 "Verification successful
33 "
34
35 test "CMS decrypt, Kuznyechik ACPKM+OMAC, KeyAgreement" {
36         grep "Enveloped" [openssl "cms -decrypt -debug_decrypt -in ./tc26_cms/encrypted_keyagree_a211.pem -inform PEM -inkey ./tc26_cms/recipient512_key.pem -recip ./tc26_cms/recipient512_cert.pem -originator ./tc26_cms/sender512_cert.pem"]
37 } 0 $plain_str
38
39 test "CMS decrypt, Magma ACPKM, KeyAgreement" {
40         grep "Enveloped" [openssl "cms -decrypt -debug_decrypt -in ./tc26_cms/encrypted_keyagree_a221.pem -inform PEM -inkey ./tc26_cms/recipient256_key.pem -recip ./tc26_cms/recipient256_cert.pem -originator ./tc26_cms/sender256_cert.pem"]
41 } 0 $plain_str
42
43 test "CMS decrypt, Kuznyechik ACPKM, KeyTrans" {
44         grep "Enveloped" [openssl "cms -decrypt -in ./tc26_cms/encrypted_keytrans_a231.pem -inform PEM -inkey ./tc26_cms/recipient256_key.pem"]
45 } 0 $plain_str
46
47 test "CMS decrypt, Magma ACPKM+OMAC, KeyTrans" {
48         grep "Enveloped" [openssl "cms -decrypt -debug_decrypt -in ./tc26_cms/encrypted_keytrans_a241.pem -inform PEM -inkey ./tc26_cms/recipient512_key.pem "]
49 } 0 $plain_str
50
51 end_tests