X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=tcl_tests%2Fcmstc262019.try;h=7e1402644cc1c99e1e2b439cabfefb13ded953d2;hb=a42d467935d3ce859e288f3934df2e25073f9ba9;hp=478298e04bfca049e162eaeff9fd5073353e6e47;hpb=3b8ddfe2f303b8931842e52bdb5c07c97042f651;p=openssl-gost%2Fengine.git diff --git a/tcl_tests/cmstc262019.try b/tcl_tests/cmstc262019.try index 478298e..7e14026 100644 --- a/tcl_tests/cmstc262019.try +++ b/tcl_tests/cmstc262019.try @@ -5,6 +5,7 @@ package require ossltest file delete -force $::test::dir/tc26_cms file copy -force tc26_cms $::test::dir cd $::test::dir +set plain_str [getFile ./tc26_cms/plain/text_decrypted.plain] start_tests "CMS tests, TC26 examples" @@ -13,12 +14,12 @@ start_tests "CMS tests, TC26 examples" test "Signed data, 512 bits, signed attributes" { grep "Verification successful" [openssl "cms -verify -in tc26_cms/signed_a111.pem -inform PEM -noverify"] -} 0 "Verification successful +} 0 "CMS Verification successful " test "Signed data, 256 bits, no signed attributes" { grep "Verification successful" [openssl "cms -verify -in tc26_cms/signed_a121.pem -inform PEM -noverify"] -} 0 "Verification successful +} 0 "CMS Verification successful " test "Digested data, 256 bits" { @@ -31,4 +32,20 @@ test "Digested data, 512 bits" { } 0 "Verification successful " +test "CMS decrypt, Kuznyechik ACPKM+OMAC, KeyAgreement" { + 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"] +} 0 $plain_str + +test "CMS decrypt, Magma ACPKM, KeyAgreement" { + 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"] +} 0 $plain_str + +test "CMS decrypt, Kuznyechik ACPKM, KeyTrans" { + grep "Enveloped" [openssl "cms -decrypt -in ./tc26_cms/encrypted_keytrans_a231.pem -inform PEM -inkey ./tc26_cms/recipient256_key.pem"] +} 0 $plain_str + +test "CMS decrypt, Magma ACPKM+OMAC, KeyTrans" { + grep "Enveloped" [openssl "cms -decrypt -debug_decrypt -in ./tc26_cms/encrypted_keytrans_a241.pem -inform PEM -inkey ./tc26_cms/recipient512_key.pem "] +} 0 $plain_str + end_tests