projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fac61ea
)
rand: improve error message for rand pool overflows
author
Richard Levitte
<levitte@openssl.org>
Wed, 11 Oct 2023 01:19:23 +0000
(12:19 +1100)
committer
Matt Caswell
<matt@openssl.org>
Tue, 24 Oct 2023 10:14:02 +0000
(11:14 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22394)
crypto/rand/rand_pool.c
patch
|
blob
|
history
diff --git
a/crypto/rand/rand_pool.c
b/crypto/rand/rand_pool.c
index 8dc230b540f619420c6ecf13bc8d420a26cdd641..8d77b77fd21dbc1c86e13ed67f5aa9e87699d510 100644
(file)
--- a/
crypto/rand/rand_pool.c
+++ b/
crypto/rand/rand_pool.c
@@
-249,7
+249,11
@@
size_t ossl_rand_pool_bytes_needed(RAND_POOL *pool, unsigned int entropy_factor)
if (bytes_needed > pool->max_len - pool->len) {
/* not enough space left */
- ERR_raise(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW);
+ ERR_raise_data(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW,
+ "entropy_factor=%u, entropy_needed=%zu, bytes_needed=%zu,"
+ "pool->max_len=%zu, pool->len=%zu",
+ entropy_factor, entropy_needed, bytes_needed,
+ pool->max_len, pool->len);
return 0;
}