diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2017-09-15 21:14:34 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-10-10 14:00:43 +0200 |
commit | c2e33a05b1eb9dda988aebdeaa529973d7c22142 (patch) | |
tree | a1abf31a51c8d5ab6458b922d397f57a7a732f25 /crypto/rand/drbg_lib.c | |
parent | d90e128be6e584d319931c78cb8f8f68d17b6a34 (diff) |
crypto/rand: fix some style nit's
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7378)
Diffstat (limited to 'crypto/rand/drbg_lib.c')
-rw-r--r-- | crypto/rand/drbg_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index 10a17a9a5f..c59f3f0026 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -286,7 +286,7 @@ static RAND_DRBG *rand_drbg_new(int secure, return drbg; -err: + err: if (drbg->secure) OPENSSL_secure_free(drbg); else @@ -378,7 +378,7 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg, entropylen = drbg->get_entropy(drbg, &entropy, min_entropy, min_entropylen, max_entropylen, 0); if (entropylen < min_entropylen - || entropylen > max_entropylen) { + || entropylen > max_entropylen) { RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, RAND_R_ERROR_RETRIEVING_ENTROPY); goto end; } @@ -408,10 +408,10 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg, drbg->reseed_prop_counter = drbg->parent->reseed_prop_counter; } -end: + end: if (entropy != NULL && drbg->cleanup_entropy != NULL) drbg->cleanup_entropy(drbg, entropy, entropylen); - if (nonce != NULL && drbg->cleanup_nonce!= NULL ) + if (nonce != NULL && drbg->cleanup_nonce != NULL) drbg->cleanup_nonce(drbg, nonce, noncelen); if (drbg->pool != NULL) { if (drbg->state == DRBG_READY) { @@ -504,7 +504,7 @@ int RAND_DRBG_reseed(RAND_DRBG *drbg, drbg->max_entropylen, prediction_resistance); if (entropylen < drbg->min_entropylen - || entropylen > drbg->max_entropylen) { + || entropylen > drbg->max_entropylen) { RANDerr(RAND_F_RAND_DRBG_RESEED, RAND_R_ERROR_RETRIEVING_ENTROPY); goto end; } @@ -522,7 +522,7 @@ int RAND_DRBG_reseed(RAND_DRBG *drbg, drbg->reseed_prop_counter = drbg->parent->reseed_prop_counter; } -end: + end: if (entropy != NULL && drbg->cleanup_entropy != NULL) drbg->cleanup_entropy(drbg, entropy, entropylen); if (drbg->state == DRBG_READY) |