diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-03-07 07:55:10 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-03-07 11:45:13 +0100 |
commit | 12ab4f725d605130a7719a687981d9d1d3e6337f (patch) | |
tree | 3d8ba213ef007b4f02286caa3e42234b202bbabc /tests/rng-no-onload.c | |
parent | 603772688c4e37dae437b4cede12e25b9dd9f678 (diff) | |
download | gnutls-12ab4f725d605130a7719a687981d9d1d3e6337f.tar.gz |
tests: converted compile-time checks for FIPS140 mode to run-timetmp-use-thread-local-rng
This allows running the complete test suite even when the library
is compiled in FIPS140-2 mode, as long as the run-time is not at
this mode.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'tests/rng-no-onload.c')
-rw-r--r-- | tests/rng-no-onload.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/rng-no-onload.c b/tests/rng-no-onload.c index 726b5fddf4..ac01be2144 100644 --- a/tests/rng-no-onload.c +++ b/tests/rng-no-onload.c @@ -32,7 +32,7 @@ #include <gnutls/crypto.h> #include "utils.h" -#if defined(ENABLE_FIPS140) || !defined(__linux__) || !defined(__GNUC__) +#if !defined(__linux__) || !defined(__GNUC__) void doit(void) { @@ -58,6 +58,10 @@ gnutls_rnd(gnutls_rnd_level_t level, void *data, size_t len) void doit(void) { + if (gnutls_fips140_mode_enabled()) { + exit(77); + } + global_init(); if (_rnd_called != 0) |