projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new program dhparam and update docs.
[oweals/openssl.git]
/
rsaref
/
rsaref.c
diff --git
a/rsaref/rsaref.c
b/rsaref/rsaref.c
index 7677eb9fce9fa10c9f7c2abf4e082f32d6a5fbde..ae70feb3e9b0e246d07d0891ef0087cb34c96d61 100644
(file)
--- 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)
{
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;
}
R_RandomUpdate(&rnd,buf,(unsigned int)((i>16)?16:i));
i-=16;
}
@@
-298,4
+299,10
@@
err:
memset(&rnd,0,sizeof(rnd));
return(outlen);
}
memset(&rnd,0,sizeof(rnd));
return(outlen);
}
+#else /* !NO_RSA */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif
#endif