summaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-04-17 08:07:11 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-04-17 17:24:50 +0200
commit43687d685ffd71fc1cf0ea1079f6d4958dff5026 (patch)
treef1ee2ba81682e92bb7eeb4bd495a86b23101482e /crypto/rand
parent826e154481e93413a79c37cb1bf4da6175a05875 (diff)
DRBG: fix coverity issues
- drbg_lib.c: Silence coverity warning: the comment preceding the RAND_DRBG_instantiate() call explicitely states that the error is ignored and explains the reason why. - drbgtest: Add checks for the return values of RAND_bytes() and RAND_priv_bytes() to run_multi_thread_test(). Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5976)
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/drbg_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index cc59236bcc..16ac03b8b6 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -864,14 +864,14 @@ static RAND_DRBG *drbg_setup(RAND_DRBG *parent)
drbg->reseed_counter = 1;
/*
- * Ignore instantiation error so support just-in-time instantiation.
+ * Ignore instantiation error to support just-in-time instantiation.
*
* The state of the drbg will be checked in RAND_DRBG_generate() and
* an automatic recovery is attempted.
*/
- RAND_DRBG_instantiate(drbg,
- (const unsigned char *) ossl_pers_string,
- sizeof(ossl_pers_string) - 1);
+ (void)RAND_DRBG_instantiate(drbg,
+ (const unsigned char *) ossl_pers_string,
+ sizeof(ossl_pers_string) - 1);
return drbg;
err: