From: Nikos Mavrogiannopoulos Date: Sat, 30 Nov 2013 18:06:14 +0000 (+0100) Subject: execute the FIPS-test even when not in FIPS140 mode. X-Git-Tag: gnutls_3_3_0pre0~516 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9eef3d6263171009523d11938e340ef90d32fd39;p=thirdparty%2Fgnutls.git execute the FIPS-test even when not in FIPS140 mode. --- diff --git a/tests/Makefile.am b/tests/Makefile.am index b3e141f24b..520e07004c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -73,11 +73,8 @@ ctests = simple gc set_pkcs12_cred certder certuniqueid \ mini-dtls-heartbeat mini-x509-callbacks key-openssl priorities \ mini-dtls-srtp mini-xssl rsa-encrypt-decrypt mini-loss-time \ mini-record mini-dtls-record mini-handshake-timeout mini-record-range \ - mini-cert-status mini-rsa-psk mini-record-2 global-init - -if ENABLE_FIPS140 -ctests += fips-test -endif + mini-cert-status mini-rsa-psk mini-record-2 global-init \ + fips-test if ENABLE_OCSP ctests += ocsp diff --git a/tests/fips-test.c b/tests/fips-test.c index cf3b833422..9566e0d1a7 100644 --- a/tests/fips-test.c +++ b/tests/fips-test.c @@ -26,7 +26,6 @@ static uint8_t iv16[16]; void doit(void) { int ret; -#ifdef ENABLE_FIPS140 unsigned int mode; gnutls_cipher_hd_t ch; gnutls_hmac_hd_t mh; @@ -38,7 +37,7 @@ void doit(void) gnutls_datum_t iv = { iv16, sizeof(iv16) }; fprintf(stderr, - "Please note that you need to assure the library's integrity prior to running this test\n"); + "Please note that if in FIPS140 mode, you need to assure the library's integrity prior to running this test\n"); gnutls_global_set_log_function(tls_log_func); if (debug) @@ -47,7 +46,6 @@ void doit(void) mode = gnutls_fips140_mode_enabled(); if (mode == 0) { success("We are not in FIPS140 mode\n"); - exit(77); } ret = global_init(); @@ -141,7 +139,4 @@ void doit(void) gnutls_global_deinit(); return; -#else - exit(1); /* fail. This script shouldn't be called on this case */ -#endif }