aboutsummaryrefslogtreecommitdiff
path: root/test_params.c
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2019-02-15 22:18:08 +0300
committerVitaly Chikunov <vt@altlinux.org>2019-02-15 23:21:56 +0300
commit32da2bf229ba8bebf2c6f6ac1fc016c49e867488 (patch)
treebba75e3d7c0bb4e322ee55555914cae7182d1ff1 /test_params.c
parentb629c446ff7246e526999bfdd2657e774faf306f (diff)
downloadgost-engine-32da2bf229ba8bebf2c6f6ac1fc016c49e867488.zip
gost-engine-32da2bf229ba8bebf2c6f6ac1fc016c49e867488.tar.gz
gost-engine-32da2bf229ba8bebf2c6f6ac1fc016c49e867488.tar.bz2
tests: Load just built engine from the output directory
Define ENGINE_DIR for all binary tests. Instead of auto-loading engine using `example.conf' load it directly from the OUTPUT_DIRECTORY for curves tests.
Diffstat (limited to 'test_params.c')
-rw-r--r--test_params.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test_params.c b/test_params.c
index 3e12d5a..f7d4b90 100644
--- a/test_params.c
+++ b/test_params.c
@@ -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;
}