summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-07-23 18:07:19 +1000
committerPauli <paul.dale@oracle.com>2019-07-23 23:30:12 +1000
commitb4b42d441d350b48449ea93aaa035152123f70ae (patch)
tree05b66afd9b998f24aa6d048eb2e087ca5b7dc4df /include
parente8d866dcb170dbe22dcda418cd5df655f67dbc0b (diff)
Make rand_pool buffers more dynamic in their sizing.
The rand pool support allocates maximal sized buffers -- this is typically 12288 bytes in size. These pools are allocated in secure memory which is a scarse resource. They are also allocated per DRBG of which there are up to two per thread. This change allocates 64 byte pools and grows them dynamically if required. 64 is chosen to be sufficiently large so that pools do not normally need to grow. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9428) (cherry picked from commit a6a66e4511eec0f4ecc2943117a42b3723eb2222)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/randerr.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h
index d9aa9b3d70..70d1a17a4c 100644
--- a/include/openssl/randerr.h
+++ b/include/openssl/randerr.h
@@ -11,9 +11,7 @@
#ifndef HEADER_RANDERR_H
# define HEADER_RANDERR_H
-# ifndef HEADER_SYMHACKS_H
-# include <openssl/symhacks.h>
-# endif
+# include <openssl/symhacks.h>
# ifdef __cplusplus
extern "C"
@@ -46,6 +44,7 @@ int ERR_load_RAND_strings(void);
# define RAND_F_RAND_POOL_ADD_END 114
# define RAND_F_RAND_POOL_ATTACH 124
# define RAND_F_RAND_POOL_BYTES_NEEDED 115
+# define RAND_F_RAND_POOL_GROW 125
# define RAND_F_RAND_POOL_NEW 116
# define RAND_F_RAND_WRITE_FILE 112