- Add tests for RAND_add function when searching for OpenSSL

This commit is contained in:
Damien Miller 2000-04-04 10:21:09 +10:00
parent 70494d18ee
commit 193ba88dd6
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,6 @@
20000404
- Add tests for RAND_add function when searching for OpenSSL
20000403
- Wrote entropy collection routines for systems that lack /dev/random
and EGD

View File

@ -231,7 +231,7 @@ for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /
{
RSA *key; char a[2048],b[2048];;
memset(a, 0, sizeof(a));memset(b, 0, sizeof(b));
RAND_seed(a, sizeof(a));
RAND_add(a, sizeof(a), sizeof(a));
key=RSA_generate_key(32,3,NULL,NULL);
if (key==NULL) return(1);
return(-1==RSA_private_decrypt(RSA_size(key),a,b,key,RSA_NO_PADDING));