diff options
author | Emilia Kasper <emilia@openssl.org> | 2016-03-14 12:21:44 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-14 17:03:53 +0100 |
commit | c91a0a8343a22b5e4dff45ecfdee2eae8ab8a504 (patch) | |
tree | ea6fbcc2757ddc4b351b571287f22c055f1cdd3c /test/afalgtest.c | |
parent | Fix typo in manual, missing ending '>' (diff) | |
download | openssl-c91a0a8343a22b5e4dff45ecfdee2eae8ab8a504.tar.xz openssl-c91a0a8343a22b5e4dff45ecfdee2eae8ab8a504.zip |
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 <levitte@openssl.org>
Diffstat (limited to 'test/afalgtest.c')
-rw-r--r-- | test/afalgtest.c | 24 |
1 files changed, 15 insertions, 9 deletions
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 <stdio.h> +#include <openssl/opensslconf.h> + +#ifndef OPENSSL_NO_AFALGENG +#include <string.h> #include <openssl/engine.h> #include <openssl/evp.h> #include <openssl/rand.h> -#include <string.h> - -#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 |