diff options
author | Rich Salz <rsalz@openssl.org> | 2017-07-05 16:08:19 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-07-06 13:59:11 -0400 |
commit | 9ee344f5cd5e935c60d3bf7c3ce9ee21895069db (patch) | |
tree | 1ea4f471479184095329b3d8087e149081ea0918 /include | |
parent | 60eba30f60de55e3c782469fa555eede82606099 (diff) |
Cleanup RAND_load_file,RAND_write_file
Document an internal assumption that these are only for use with files,
and return an error if not. That made the code much simpler.
Leave it as writing 1024 bytes, even though we don't need more than 256
from a security perspective. But the amount isn't specified, now, so we
can change it later if we want.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3864)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/randerr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h index 5c9ab86507..244fd0e4b4 100644 --- a/include/openssl/randerr.h +++ b/include/openssl/randerr.h @@ -23,11 +23,16 @@ int ERR_load_RAND_strings(void); * RAND function codes. */ # define RAND_F_RAND_BYTES 100 +# define RAND_F_RAND_LOAD_FILE 101 +# define RAND_F_RAND_WRITE_FILE 102 /* * RAND reason codes. */ +# define RAND_R_CANNOT_OPEN_FILE 102 # define RAND_R_FUNC_NOT_IMPLEMENTED 101 +# define RAND_R_FWRITE_ERROR 103 +# define RAND_R_NOT_A_REGULAR_FILE 104 # define RAND_R_PRNG_NOT_SEEDED 100 #endif |