]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_params.c
tests: Load just built engine from the output directory
[openssl-gost/engine.git] / test_params.c
index 3e12d5a9669bbd23e2a8da997270128f6e38e4e7..f7d4b90f8fbb3989ea9b94ce4713f9e38bfb0207 100644 (file)
@@ -1093,9 +1093,13 @@ int main(int argc, char **argv)
 {
     int ret = 0;
 
-    setenv("OPENSSL_CONF", "../example.conf", 0);
+    setenv("OPENSSL_ENGINES", ENGINE_DIR, 0);
     OPENSSL_add_all_algorithms_conf();
     ERR_load_crypto_strings();
+    ENGINE *eng;
+    T(eng = ENGINE_by_id("gost"));
+    T(ENGINE_init(eng));
+    T(ENGINE_set_default(eng, ENGINE_METHOD_ALL));
 
     struct test_param **tpp;
     for (tpp = test_params; *tpp; tpp++)
@@ -1105,5 +1109,8 @@ int main(int argc, char **argv)
     for (tc = test_certs; tc->cert; tc++)
        ret |= test_cert(tc);
 
+    ENGINE_finish(eng);
+    ENGINE_free(eng);
+
     return ret;
 }