Commit 469d2338 authored by vysheng's avatar vysheng

Merge pull request #242 from nopjmp/fix_rand_bytes

fixed RAND_bytes return code checking
parents f38ab35b a7100984
...@@ -269,7 +269,7 @@ double tglt_get_double_time (void) { ...@@ -269,7 +269,7 @@ double tglt_get_double_time (void) {
} }
void tglt_secure_random (void *s, int l) { void tglt_secure_random (void *s, int l) {
if (RAND_bytes (s, l) < 0) { if (RAND_bytes (s, l) <= 0) {
/*if (allow_weak_random) { /*if (allow_weak_random) {
RAND_pseudo_bytes (s, l); RAND_pseudo_bytes (s, l);
} else {*/ } else {*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment