]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test/00-engine.t
test: Make perl tests report success or failure
[openssl-gost/engine.git] / test / 00-engine.t
index 35b5f929b61bd592b8d4bfaa06c5296c71597b47..adc78b561a4a19da24e63ce869b339ccab3aaee9 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-use Test::More tests => 5;
+use Test::More tests => 7;
 use Cwd 'abs_path';
 
 # prepare data for 
@@ -8,8 +8,10 @@ open F,">","testdata.dat";
 print F "12345670" x 128;
 close F;
 
-# Set OPENSSL_ENGINES environment variable to just build engine
-$ENV{'OPENSSL_ENGINES'} = abs_path("../.libs");
+# Set OPENSSL_ENGINES environment variable to just built engine
+if(!defined $ENV{'OPENSSL_ENGINES'}){
+       $ENV{'OPENSSL_ENGINES'} = abs_path("../.libs");
+}
 
 $key='0123456789abcdef' x 2;
 
@@ -38,7 +40,7 @@ if ( -f $engine . ".info") {
 
 $engine_info= <<EOINF;
 (gost) Reference implementation of GOST engine
- [gost89, gost89-cnt, gost89-cnt-12, gost89-cbc, md_gost94, gost-mac, md_gost12_256, md_gost12_512, gost-mac-12, gost2001, gost-mac, gost2012_256, gost2012_512, gost-mac-12]
+ [gost89, gost89-cnt, gost89-cnt-12, gost89-cbc, grasshopper-ecb, grasshopper-cbc, grasshopper-cfb, grasshopper-ofb, grasshopper-ctr, magma-cbc, magma-ctr, md_gost94, gost-mac, md_gost12_256, md_gost12_512, gost-mac-12, magma-mac, grasshopper-mac, gost2001, gost-mac, gost2012_256, gost2012_512, gost-mac-12, magma-mac, grasshopper-mac]
 EOINF
 }
 
@@ -78,5 +80,9 @@ is(`openssl dgst -engine $engine -md_gost94 testdata.dat`,
 "md_gost94(testdata.dat)= f7fc6d16a6a5c12ac4f7d320e0fd0d8354908699125e09727a4ef929122b1cae\n",
 "compute digest with both config and explicit engine param");
 
+like(`openssl ciphers`, qr|GOST2001-GOST89-GOST89|, 'display GOST2001-GOST89-GOST89 cipher');
+
+like(`openssl ciphers`, qr|GOST2012-GOST8912-GOST8912|, 'display GOST2012-GOST8912-GOST8912 cipher');
+
 unlink('testdata.dat');
 unlink('test.cnf');