diff options
author | Richard Levitte <levitte@openssl.org> | 2018-02-07 14:01:13 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-02-07 16:15:47 +0100 |
commit | 227a1e3f45bf06fdb00f2bdfb922f6f0d1f1d1de (patch) | |
tree | 217e433874a0e4f41f0dc074d477187413f219ed /test/afalgtest.c | |
parent | bed4afa81b9c94596cae44226e7506d9b07fe5a5 (diff) | |
download | openssl-new-227a1e3f45bf06fdb00f2bdfb922f6f0d1f1d1de.tar.gz |
Modify test/afalgtest to fail if the afalg engine couldn't be loaded
If you know that there's no afalg engine, don't run this test.
test/recipes/30-test_afalg.t checks this correctly.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5270)
Diffstat (limited to 'test/afalgtest.c')
-rw-r--r-- | test/afalgtest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/afalgtest.c b/test/afalgtest.c index adb2977f30..bf9054554a 100644 --- a/test/afalgtest.c +++ b/test/afalgtest.c @@ -128,14 +128,14 @@ int global_init(void) int setup_tests(void) { #ifndef OPENSSL_NO_ENGINE - if ((e = ENGINE_by_id("afalg")) == NULL) { + if (!TEST_ptr(e = ENGINE_by_id("afalg"))) { /* Probably a platform env issue, not a test failure. */ - TEST_info("Can't load AFALG engine"); - } else { + TEST_info("Can't load AFALG engine, you might want to check $OPENSSL_ENGINES"); + return 0; + } # ifndef OPENSSL_NO_AFALGENG - ADD_ALL_TESTS(test_afalg_aes_cbc, 3); + ADD_ALL_TESTS(test_afalg_aes_cbc, 3); # endif - } #endif return 1; |