aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Shipitsin <chipitsine@gmail.com>2018-06-26 21:48:33 +0500
committerGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>2018-08-21 19:37:10 +0300
commiteb29444f62b63127bc39bf673617c24de557c2eb (patch)
tree4f64a0c5d919f01175bdbff7c34975299d3ec9ab
parentffd061c803b2d45fc26234ef6054a250f2abe5ba (diff)
downloadgost-engine-eb29444f62b63127bc39bf673617c24de557c2eb.zip
gost-engine-eb29444f62b63127bc39bf673617c24de557c2eb.tar.gz
gost-engine-eb29444f62b63127bc39bf673617c24de557c2eb.tar.bz2
allow OPENSSL_ENGINES to be specified explicitly
(cherry picked from commit 6eb11c677ad3c948da4abdca45ff451f50f413c1)
-rw-r--r--test/00-engine.t6
-rw-r--r--test/01-digest.t6
-rw-r--r--test/02-mac.t6
-rw-r--r--test/03-encrypt.t6
-rw-r--r--test/04-pkey.t6
5 files changed, 20 insertions, 10 deletions
diff --git a/test/00-engine.t b/test/00-engine.t
index 35b5f92..3077093 100644
--- a/test/00-engine.t
+++ b/test/00-engine.t
@@ -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;
diff --git a/test/01-digest.t b/test/01-digest.t
index cea8358..3838fd2 100644
--- a/test/01-digest.t
+++ b/test/01-digest.t
@@ -2,8 +2,10 @@
use Test::More tests => 16;
use Cwd 'abs_path';
-# 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");
+}
# Set engine name from environment to allow testing of different engines
$engine=$ENV{'ENGINE_NAME'}||"gost";
# Reopen STDERR to eliminate extra output
diff --git a/test/02-mac.t b/test/02-mac.t
index 185bac1..5713dca 100644
--- a/test/02-mac.t
+++ b/test/02-mac.t
@@ -11,8 +11,10 @@ close F;
open F,">","testbig.dat";
print F ("12345670" x 8 . "\n") x 4096;
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;
diff --git a/test/03-encrypt.t b/test/03-encrypt.t
index 9cada34..d5b56c4 100644
--- a/test/03-encrypt.t
+++ b/test/03-encrypt.t
@@ -11,8 +11,10 @@ $use_config = 1;
# prepare data for
-# 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;
diff --git a/test/04-pkey.t b/test/04-pkey.t
index bd4a94f..84ae81e 100644
--- a/test/04-pkey.t
+++ b/test/04-pkey.t
@@ -11,8 +11,10 @@ $use_config = 1;
# prepare data for
-# 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");
+}
$engine=$ENV{'ENGINE_NAME'}||"gost";