Don't call setenv in gost2814789t.c
authorDr. Stephen Henson <steve@openssl.org>
Wed, 23 Jul 2014 16:19:48 +0000 (17:19 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 24 Jul 2014 17:18:54 +0000 (18:18 +0100)
The call to setenv in gost2814789t.c is not portable and may
not reflect the location of the GOST ENGINE on all platforms anyway.
Instead set OPENSSL_ENGINES in test/Makefile
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
engines/ccgost/gost2814789t.c
test/Makefile

index a59ac9240969ad300f4d96347f3d9aac57512b07..ded5b3405f09235df63d1ba1d9a1bed83934575b 100644 (file)
@@ -28,7 +28,6 @@ int main(int argc, char *argv[])
 #include <openssl/obj_mac.h>
 
 #define CCGOST_ID "gost"
-#define CCGOST_DIR "../engines/ccgost"
 
 #include "../engines/ccgost/gost89.h"
 
@@ -1403,9 +1402,6 @@ int main(int argc, char *argv[])
     /* 
      * ccgost engine test on GostR3411_94_CryptoProParamSet
      */
-    #ifndef OPENSSL_NO_DYNAMIC_ENGINE
-       setenv("OPENSSL_ENGINES", CCGOST_DIR, 1);
-    #endif
     ERR_load_crypto_strings();
     ENGINE_load_builtin_engines();
     OPENSSL_load_builtin_modules();
index 3f78c68d3c3968d337a9bf608cdb61205335a8a9..601ea1b0e29f9e7c658724e3f9a7c8d715e7b78e 100644 (file)
@@ -255,7 +255,7 @@ test_rand: $(RANDTEST)$(EXE_EXT)
        ../util/shlib_wrap.sh ./$(RANDTEST)
 
 test_gost2814789: $(GOST2814789TEST)$(EXE_EXT)
-       ../util/shlib_wrap.sh ./$(GOST2814789TEST)
+       OPENSSL_ENGINES=../engines/ccgost ../util/shlib_wrap.sh ./$(GOST2814789TEST)
 
 test_enc: ../apps/openssl$(EXE_EXT) testenc
        @sh ./testenc