From: Ilya Shipitsin Date: Tue, 26 Jun 2018 16:48:33 +0000 (+0500) Subject: allow OPENSSL_ENGINES to be specified explicitly X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=eb29444f62b63127bc39bf673617c24de557c2eb;p=openssl-gost%2Fengine.git allow OPENSSL_ENGINES to be specified explicitly (cherry picked from commit 6eb11c677ad3c948da4abdca45ff451f50f413c1) --- 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";