summaryrefslogtreecommitdiff
path: root/tests/record-sizes.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-03-07 07:55:10 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-07 11:45:13 +0100
commit12ab4f725d605130a7719a687981d9d1d3e6337f (patch)
tree3d8ba213ef007b4f02286caa3e42234b202bbabc /tests/record-sizes.c
parent603772688c4e37dae437b4cede12e25b9dd9f678 (diff)
downloadgnutls-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/record-sizes.c')
-rw-r--r--tests/record-sizes.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/record-sizes.c b/tests/record-sizes.c
index 1683da14f2..47cd5920b2 100644
--- a/tests/record-sizes.c
+++ b/tests/record-sizes.c
@@ -43,8 +43,6 @@ static void tls_log_func(int level, const char *str)
/* This test attempts to transfer various sizes using ARCFOUR-128.
*/
-#ifndef ENABLE_FIPS140
-
#define MAX_BUF 16384
static char b1[MAX_BUF + 1];
static char buffer[MAX_BUF + 1];
@@ -66,6 +64,10 @@ void doit(void)
ssize_t ns;
int ret, transferred = 0;
+ if (gnutls_fips140_mode_enabled()) {
+ exit(77);
+ }
+
/* General init. */
global_init();
gnutls_global_set_log_function(tls_log_func);
@@ -159,9 +161,3 @@ void doit(void)
gnutls_global_deinit();
}
-#else
-void doit(void)
-{
- exit(77);
-}
-#endif