From: Nikos Mavrogiannopoulos Date: Mon, 24 Oct 2016 06:30:06 +0000 (+0200) Subject: doc: explicitly state that rng self_test mustn't require rng initialization X-Git-Tag: gnutls_3_5_7~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a57ff585661bcef9b6a8ce1a59ea10834ff92f91;p=thirdparty%2Fgnutls.git doc: explicitly state that rng self_test mustn't require rng initialization --- diff --git a/lib/crypto-backend.h b/lib/crypto-backend.h index 6f4b743b88..1619bf0fa5 100644 --- a/lib/crypto-backend.h +++ b/lib/crypto-backend.h @@ -77,7 +77,7 @@ typedef struct gnutls_crypto_rnd { int (*rnd) (void *ctx, int level, void *data, size_t datasize); void (*rnd_refresh) (void *ctx); void (*deinit) (void *ctx); - int (*self_test) (void); + int (*self_test) (void); /* this should not require rng initialization */ } gnutls_crypto_rnd_st; typedef void *bigint_t; diff --git a/lib/fips.c b/lib/fips.c index 8a0ada34bc..677c047b7b 100644 --- a/lib/fips.c +++ b/lib/fips.c @@ -350,7 +350,8 @@ int _gnutls_fips_perform_self_checks2(void) gnutls_assert(); goto error; } - + + /* this does not require rng initialization */ ret = _gnutls_rnd_ops.self_test(); if (ret < 0) { gnutls_assert();