projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
RAND_load_file(): return error if reseeding failed
[openssl.git]
/
crypto
/
rand
/
randfile.c
diff --git
a/crypto/rand/randfile.c
b/crypto/rand/randfile.c
index 89720eb5cf6bb16267b1d5b5920ad91faa7512c3..028c1281c0ed947ba4168342c7d2bd1ce705c220 100644
(file)
--- a/
crypto/rand/randfile.c
+++ b/
crypto/rand/randfile.c
@@
-148,6
+148,12
@@
int RAND_load_file(const char *file, long bytes)
OPENSSL_cleanse(buf, sizeof(buf));
fclose(in);
+ if (!RAND_status()) {
+ RANDerr(RAND_F_RAND_LOAD_FILE, RAND_R_RESEED_ERROR);
+ ERR_add_error_data(2, "Filename=", file);
+ return -1;
+ }
+
return ret;
}