diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-10-23 15:20:45 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-10-23 20:41:51 +0200 |
commit | aba099092f95cda473bd7a3301c8af2ce3d27c2e (patch) | |
tree | c0d2866afdf33ae43bd30a5bdf14bce772c05ead /tests/fips-override-test.c | |
parent | 1d5e93dbd69358fe7d66a3a6dd461d7fbb0738ee (diff) | |
download | gnutls-tmp-fix-fips-mode.tar.gz |
fips140: aligned code with documentationtmp-fix-fips-mode
That is, we introduce the documented but unimplemented macros
GNUTLS_FIPS140_SET_LAX_MODE() and GNUTLS_FIPS140_SET_STRICT_MODE().
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/fips-override-test.c')
-rw-r--r-- | tests/fips-override-test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fips-override-test.c b/tests/fips-override-test.c index 8e0be9d462..5b92a1d485 100644 --- a/tests/fips-override-test.c +++ b/tests/fips-override-test.c @@ -128,6 +128,14 @@ void doit(void) if (gnutls_fips140_mode_enabled() != GNUTLS_FIPS140_STRICT) fail("switching to unknown mode didn't switch the lib to the expected mode\n"); + GNUTLS_FIPS140_SET_LAX_MODE(); + if (gnutls_fips140_mode_enabled() != GNUTLS_FIPS140_LAX) + fail("switching to lax mode did not succeed!\n"); + + GNUTLS_FIPS140_SET_STRICT_MODE(); + if (gnutls_fips140_mode_enabled() != GNUTLS_FIPS140_STRICT) + fail("switching to strict mode did not succeed!\n"); + gnutls_global_deinit(); return; } |