diff options
author | Ulf Möller <ulf@openssl.org> | 2000-01-14 03:31:32 +0100 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 2000-01-14 03:31:32 +0100 |
commit | f2b86c955cb6c3c3864b38850d573e3aa6659a33 (patch) | |
tree | 83de04a2a08c73f847392bbb190ccff1475beccd /rsaref | |
parent | Use CRYPTO_push_info to track down memory leak (diff) | |
download | openssl-f2b86c955cb6c3c3864b38850d573e3aa6659a33.tar.xz openssl-f2b86c955cb6c3c3864b38850d573e3aa6659a33.zip |
minor change for the prng
Diffstat (limited to 'rsaref')
-rw-r--r-- | rsaref/rsaref.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rsaref/rsaref.c b/rsaref/rsaref.c index 55cebc8fcb..ae70feb3e9 100644 --- a/rsaref/rsaref.c +++ b/rsaref/rsaref.c @@ -279,7 +279,8 @@ int RSA_ref_public_encrypt(int len, unsigned char *from, unsigned char *to, R_GetRandomBytesNeeded((unsigned int *)&i,&rnd); while (i > 0) { - RAND_bytes(buf,16); + if (RAND_bytes(buf,16) <= 0) + goto err; R_RandomUpdate(&rnd,buf,(unsigned int)((i>16)?16:i)); i-=16; } |