summaryrefslogtreecommitdiffstats
path: root/rsaref
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2000-01-14 02:31:32 +0000
committerUlf Möller <ulf@openssl.org>2000-01-14 02:31:32 +0000
commitf2b86c955cb6c3c3864b38850d573e3aa6659a33 (patch)
tree83de04a2a08c73f847392bbb190ccff1475beccd /rsaref
parent11afb40c011a789396d4e06682f73f55c33dff8a (diff)
minor change for the prng
Diffstat (limited to 'rsaref')
-rw-r--r--rsaref/rsaref.c3
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;
}