Support for "multiply high" instruction, see BN_UMULT_HIGH comment in
[openssl.git] / rsaref / rsaref.c
index 7677eb9fce9fa10c9f7c2abf4e082f32d6a5fbde..ae70feb3e9b0e246d07d0891ef0087cb34c96d61 100644 (file)
@@ -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;
                }
@@ -298,4 +299,10 @@ err:
        memset(&rnd,0,sizeof(rnd));
        return(outlen);
        }
+#else /* !NO_RSA */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
 #endif