From: Nikos Mavrogiannopoulos Date: Wed, 4 Dec 2013 14:11:30 +0000 (+0100) Subject: Check whether the RNG can perform many iterations without error. X-Git-Tag: gnutls_3_3_0pre0~503 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b09c9b005865c5ed4ff7e05f6bb680ec53ee6abc;p=thirdparty%2Fgnutls.git Check whether the RNG can perform many iterations without error. --- diff --git a/tests/rng-fork.c b/tests/rng-fork.c index 5e7a8d38de..4cf3246ef3 100644 --- a/tests/rng-fork.c +++ b/tests/rng-fork.c @@ -104,6 +104,14 @@ void doit(void) } } + for (i = 0; i <= 65539; i++) { + ret = gnutls_rnd(GNUTLS_RND_NONCE, buf1, sizeof(buf1)); + if (ret < 0) { + fail("Error iterating RNG more than %u times\n", i); + exit(1); + } + } + gnutls_global_deinit(); } #else