From: Ilya Shipitsin Date: Tue, 26 Jun 2018 16:48:33 +0000 (+0500) Subject: allow OPENSSL_ENGINES to be specified explicitly X-Git-Tag: v3.0.0~417^2~1^2~1 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=6eb11c677ad3c948da4abdca45ff451f50f413c1;hp=3461793cc682c3336292696ded27f117849bcef0;p=openssl-gost%2Fengine.git allow OPENSSL_ENGINES to be specified explicitly --- 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";