From 0f8af4f83efde3c8d448ed4bd8ae0879e2112607 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 11 Nov 2013 18:07:17 +0100 Subject: Added support for fips states. This implies that when in FIPS mode and the library is not in operational state (i.e., all self checks succeeded), crypto functionality of the library will fail. This includes: * API functions of gnutls/crypto.h * API functions of gnutls/abstract.h * API functions of gnutls/x509.h * gnutls_init() * API functions of gnutls/xssl.h --- lib/random.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/random.c') diff --git a/lib/random.c b/lib/random.c index 62fa785232..b5f6cd94f9 100644 --- a/lib/random.c +++ b/lib/random.c @@ -26,6 +26,7 @@ #include #include #include +#include void *gnutls_rnd_ctx; @@ -65,6 +66,7 @@ void _gnutls_rnd_deinit(void) **/ int gnutls_rnd(gnutls_rnd_level_t level, void *data, size_t len) { + FAIL_IF_FIPS_ERROR; return _gnutls_rnd(level, data, len); } -- cgit v1.2.1