From c91a0a8343a22b5e4dff45ecfdee2eae8ab8a504 Mon Sep 17 00:00:00 2001 From: Emilia Kasper Date: Mon, 14 Mar 2016 12:21:44 +0100 Subject: Disable afalg when engine is disabled. Also make it possible to disable afalg separately. we still need to update config again Reviewed-by: Richard Levitte --- test/afalgtest.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'test/afalgtest.c') diff --git a/test/afalgtest.c b/test/afalgtest.c index e1327445e2..16916b3fd7 100644 --- a/test/afalgtest.c +++ b/test/afalgtest.c @@ -52,12 +52,13 @@ * */ #include +#include + +#ifndef OPENSSL_NO_AFALGENG +#include #include #include #include -#include - -#ifndef OPENSSL_NO_AFALGENG /* Use a buffer size which is not aligned to block size */ #define BUFFER_SIZE (8 * 1024) - 13 @@ -113,14 +114,9 @@ static int test_afalg_aes_128_cbc(ENGINE *e) EVP_CIPHER_CTX_free(ctx); return status; } -#endif int main(int argc, char **argv) { -#ifdef OPENSSL_NO_AFALGENG - fprintf(stderr, "AFALG not supported - skipping AFALG tests\n"); -#else - ENGINE *e; CRYPTO_set_mem_debug(1); @@ -144,7 +140,17 @@ int main(int argc, char **argv) } ENGINE_free(e); -#endif printf("PASS\n"); return 0; } + +#else /* OPENSSL_NO_AFALGENG */ + +int main(int argc, char **argv) +{ + fprintf(stderr, "AFALG not supported - skipping AFALG tests\n"); + printf("PASS\n"); + return 0; +} + +#endif -- cgit v1.2.3