aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-07-05 16:08:19 -0400
committerRich Salz <rsalz@openssl.org>2017-07-06 13:59:11 -0400
commit9ee344f5cd5e935c60d3bf7c3ce9ee21895069db (patch)
tree1ea4f471479184095329b3d8087e149081ea0918 /include
parent60eba30f60de55e3c782469fa555eede82606099 (diff)
downloadopenssl-9ee344f5cd5e935c60d3bf7c3ce9ee21895069db.zip
openssl-9ee344f5cd5e935c60d3bf7c3ce9ee21895069db.tar.gz
openssl-9ee344f5cd5e935c60d3bf7c3ce9ee21895069db.tar.bz2
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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h
index 5c9ab86..244fd0e 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