render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
9119d9
From da7b0b8fbd276704b8b2ce4aad865dd454eb3095 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <da7b0b8fbd276704b8b2ce4aad865dd454eb3095@dist-git>
9119d9
From: Giuseppe Scrivano <gscrivan@redhat.com>
9119d9
Date: Thu, 4 Sep 2014 12:43:59 +0200
9119d9
Subject: [PATCH] tests: force FIPS testing mode with new enough GNU TLS
9119d9
 versions
9119d9
9119d9
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1128497
9119d9
9119d9
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
9119d9
(cherry picked from commit 8afbd52f29b1c04150eb1ec50162e2f1ff7c64a7)
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 tests/virnettlscontexttest.c | 2 ++
9119d9
 tests/virnettlssessiontest.c | 2 ++
9119d9
 2 files changed, 4 insertions(+)
9119d9
9119d9
diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c
9119d9
index 51a0369..a3e24a3 100644
9119d9
--- a/tests/virnettlscontexttest.c
9119d9
+++ b/tests/virnettlscontexttest.c
9119d9
@@ -113,6 +113,8 @@ mymain(void)
9119d9
 {
9119d9
     int ret = 0;
9119d9
 
9119d9
+    setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
9119d9
+
9119d9
     testTLSInit(KEYFILE);
9119d9
 
9119d9
 # define DO_CTX_TEST(_isServer, _caCrt, _crt, _expectFail)              \
9119d9
diff --git a/tests/virnettlssessiontest.c b/tests/virnettlssessiontest.c
9119d9
index 1e2683c..3af948a 100644
9119d9
--- a/tests/virnettlssessiontest.c
9119d9
+++ b/tests/virnettlssessiontest.c
9119d9
@@ -240,6 +240,8 @@ mymain(void)
9119d9
 {
9119d9
     int ret = 0;
9119d9
 
9119d9
+    setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
9119d9
+
9119d9
     testTLSInit(KEYFILE);
9119d9
 
9119d9
 # define DO_SESS_TEST(_caCrt, _serverCrt, _clientCrt, _expectServerFail, \
9119d9
-- 
9119d9
2.1.0
9119d9