diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2013-11-11 18:07:17 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2013-11-27 11:41:05 +0100 |
commit | 0f8af4f83efde3c8d448ed4bd8ae0879e2112607 (patch) | |
tree | 29a7d8c8bd69a74775a94d255e8140dfded93f65 /lib/random.c | |
parent | 8b03afa66a73aa981cd0098520a464ad3089535a (diff) | |
download | gnutls-0f8af4f83efde3c8d448ed4bd8ae0879e2112607.tar.gz |
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
Diffstat (limited to 'lib/random.c')
-rw-r--r-- | lib/random.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 <gnutls_int.h> #include <gnutls_errors.h> #include <random.h> +#include <fips.h> 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); } |