X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=tcl_tests%2Fcmstc262019.try;fp=tcl_tests%2Fcmstc262019.try;h=478298e04bfca049e162eaeff9fd5073353e6e47;hb=3b8ddfe2f303b8931842e52bdb5c07c97042f651;hp=0000000000000000000000000000000000000000;hpb=e09d5a86fe1cb876b3c7cf5eb0d890f557b466d0;p=openssl-gost%2Fengine.git diff --git a/tcl_tests/cmstc262019.try b/tcl_tests/cmstc262019.try new file mode 100644 index 0000000..478298e --- /dev/null +++ b/tcl_tests/cmstc262019.try @@ -0,0 +1,34 @@ +#!/usr/bin/tclsh + +lappend auto_path [file dirname [info script]] +package require ossltest +file delete -force $::test::dir/tc26_cms +file copy -force tc26_cms $::test::dir +cd $::test::dir + +start_tests "CMS tests, TC26 examples" + +#BUILD_AT=obj_mid.l64/ ./openssl_wrap.sh cms -verify -in ../standalone-test/tc26_cms/signed_a111.pem -inform PEM -noverify +#BUILD_AT=obj_mid.l64/ ./openssl_wrap.sh cms -verify -in ../standalone-test/tc26_cms/signed_a121.pem -inform PEM -noverify + +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 +" + +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 +" + +test "Digested data, 256 bits" { + grep "Verification successful" [openssl "cms -digest_verify -in tc26_cms/hashed_a311.pem -inform PEM -out hashed_a311.out"] +} 0 "Verification successful +" + +test "Digested data, 512 bits" { + grep "Verification successful" [openssl "cms -digest_verify -in tc26_cms/hashed_a321.pem -inform PEM -out hashed_a321.out"] +} 0 "Verification successful +" + +end_tests