]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Merge pull request #65 from chipitsine/modernize_ci
authorDmitry Belyavskiy <beldmit@users.noreply.github.com>
Thu, 28 Jun 2018 15:41:16 +0000 (18:41 +0300)
committerGitHub <noreply@github.com>
Thu, 28 Jun 2018 15:41:16 +0000 (18:41 +0300)
modernize ci

.ci/build-check.sh [deleted file]
.ci/build-openssl.sh [deleted file]
.travis.yml
test/00-engine.t

diff --git a/.ci/build-check.sh b/.ci/build-check.sh
deleted file mode 100755 (executable)
index e60045c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-set -eux
-
-cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib
-make
-
-cp ./bin/gost.so ${PREFIX}/lib/engines-1.1
-
-export LD_LIBRARY_PATH=${PREFIX}/lib
-
-${PREFIX}/bin/openssl ciphers |grep GOST
diff --git a/.ci/build-openssl.sh b/.ci/build-openssl.sh
deleted file mode 100755 (executable)
index 1e3064f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-set -eux
-
-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 128a15b85311de2f82bc9427b780cf9019059d23..b3d8ad107d9cdc81acd1a8f1c3d293a1620c1350 100644 (file)
@@ -7,7 +7,10 @@ language: c
 
 env:
   global:
-    - PREFIX="${HOME}/opt"
+    - PREFIX=${HOME}/opt
+    - LD_LIBRARY_PATH=${PREFIX}/lib
+    - PATH=${PREFIX}/bin:${PATH}
+    - OPENSSL_ENGINES=${TRAVIS_BUILD_DIR}/bin
 
 matrix:
   include:
@@ -22,7 +25,11 @@ matrix:
 #      compiler: gcc
 
 before_script:
-  - .ci/build-openssl.sh > build.log 2>&1 || (cat build.log && exit 1)
+  - git clone -b ${OPENSSL_BRANCH} https://github.com/openssl/openssl.git
+  - cd openssl
+  - ./config shared --prefix=${PREFIX} --openssldir=${PREFIX} && make all install_sw > build.log 2>&1 || (cat build.log && exit 1)
+  - cd ..
 
 script:
-  - .ci/build-check.sh
+  - cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib && make
+  - prove -v test/{00-engine.t,01-digest.t,02-mac.t,03-encrypt.t}
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');