aboutsummaryrefslogtreecommitdiff
path: root/test_context.c
diff options
context:
space:
mode:
authorRichard Levitte <richard@levitte.org>2021-05-01 08:36:55 +0200
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>2021-05-02 16:10:29 +0300
commitf3e84b52d2c5bf6774070b758714b90845d722d2 (patch)
tree5f9c8683888285e8ec5c84ddf4e4ceb777c85b06 /test_context.c
parent336c30e54ca42f54641ee06c9dce26ecd454b6ea (diff)
downloadgost-engine-f3e84b52d2c5bf6774070b758714b90845d722d2.zip
gost-engine-f3e84b52d2c5bf6774070b758714b90845d722d2.tar.gz
gost-engine-f3e84b52d2c5bf6774070b758714b90845d722d2.tar.bz2
Make test programs less hard-coded
The following programs had a hard coded load of the gost engine. This changes them to rely more on the testing environment, and to load engines through configuration files. This affects: test_ciphers.c, test_context.c, test_derive.c, test_digest.c, test_params.c, test_sign.c, test_tls.c
Diffstat (limited to 'test_context.c')
-rw-r--r--test_context.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/test_context.c b/test_context.c
index 0db2163..1e284c0 100644
--- a/test_context.c
+++ b/test_context.c
@@ -245,13 +245,7 @@ int main(int argc, char **argv)
{
int ret = 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));
const struct testcase_cipher *tc;
for (tc = testcases_ciphers; tc->nid; tc++) {
@@ -263,9 +257,6 @@ int main(int argc, char **argv)
ret |= test_contexts_digest(td->nid, td->mac);
}
- ENGINE_finish(eng);
- ENGINE_free(eng);
-
if (ret)
printf(cDRED "= Some tests FAILED!" cNORM "\n");
else