]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
modernize ci:
authorIlya Shipitsin <chipitsine@gmail.com>
Wed, 27 Jun 2018 12:38:39 +0000 (17:38 +0500)
committerIlya Shipitsin <chipitsine@gmail.com>
Wed, 27 Jun 2018 12:38:39 +0000 (17:38 +0500)
(*) convert 'openssl ciphers | grep ...' into Test:More syntax
(*) enable some tests on travis-ci (04 is yet broken)

.ci/build-check.sh
.ci/build-openssl.sh
test/00-engine.t

index e60045c2e898ce11eb196b11c394ce9e568da730..3e843f68b9cde40238eae8870416a28563062827 100755 (executable)
@@ -7,5 +7,8 @@ make
 cp ./bin/gost.so ${PREFIX}/lib/engines-1.1
 
 export LD_LIBRARY_PATH=${PREFIX}/lib
+export PATH=${PREFIX}/bin:${PATH}
+export OPENSSL_ENGINES=${PREFIX}/lib/engines-1.1
+
+prove -v test/{00-engine.t,01-digest.t,02-mac.t,03-encrypt.t}
 
-${PREFIX}/bin/openssl ciphers |grep GOST
index 1e3064fed707a449da078cec3471928857c8390d..4c85b9446c8117009142b699a18302bf8d8c1730 100755 (executable)
@@ -6,18 +6,3 @@ git clone -b ${OPENSSL_BRANCH} https://github.com/openssl/openssl.git
 cd openssl
 ./config shared --prefix=${PREFIX} --openssldir=${PREFIX}
 make all install_sw
-
-cat <<EOF >> ${PREFIX}/openssl.cnf
-openssl_conf = openssl_def
-
-[openssl_def]
-engines = engine_section
-
-[engine_section]
-gost = gost_section
-
-[gost_section]
-default_algorithms = ALL
-engine_id = gost
-CRYPT_PARAMS = id-Gost28147-89-CryptoPro-A-ParamSet
-EOF
index a3d1037857028d5a10f65b73f74ec354f70ac271..9104ab0df709e6214aa6c54363729a0d1e41514b 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 
@@ -80,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');