diff options
Diffstat (limited to 'crypto/openssl/rsaref')
-rw-r--r-- | crypto/openssl/rsaref/rsar_err.c | 3 | ||||
-rw-r--r-- | crypto/openssl/rsaref/rsaref.c | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/crypto/openssl/rsaref/rsar_err.c b/crypto/openssl/rsaref/rsar_err.c index 438acf5..ba7b605 100644 --- a/crypto/openssl/rsaref/rsar_err.c +++ b/crypto/openssl/rsaref/rsar_err.c @@ -55,7 +55,8 @@ */ /* NOTE: this file was auto generated by the mkerr.pl script: any changes - * made to it will be overwritten when the script next updates this file. + * made to it will be overwritten when the script next updates this file, + * only reason strings will be preserved. */ #include <stdio.h> diff --git a/crypto/openssl/rsaref/rsaref.c b/crypto/openssl/rsaref/rsaref.c index 6a5face..6748890 100644 --- a/crypto/openssl/rsaref/rsaref.c +++ b/crypto/openssl/rsaref/rsaref.c @@ -280,7 +280,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; } @@ -299,4 +300,10 @@ err: memset(&rnd,0,sizeof(rnd)); return(outlen); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif |