summaryrefslogtreecommitdiff
path: root/tests/pkcs12_encode.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/pkcs12_encode.c
parent603772688c4e37dae437b4cede12e25b9dd9f678 (diff)
downloadgnutls-tmp-use-thread-local-rng.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/pkcs12_encode.c')
-rw-r--r--tests/pkcs12_encode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/pkcs12_encode.c b/tests/pkcs12_encode.c
index 46c5092e49..3b0e84ef13 100644
--- a/tests/pkcs12_encode.c
+++ b/tests/pkcs12_encode.c
@@ -128,11 +128,12 @@ void doit(void)
}
/* Generate and add PKCS#12 cert bags. */
-#ifndef ENABLE_FIPS140
- tests = 2; /* include RC2 */
-#else
- tests = 1;
-#endif
+ if (!gnutls_fips140_mode_enabled()) {
+ tests = 2; /* include RC2 */
+ } else {
+ tests = 1;
+ }
+
for (i = 0; i < tests; i++) {
ret = gnutls_pkcs12_bag_init(&bag);
if (ret < 0) {