Precautions against using the PRNG uninitialized: RAND_bytes() now
[openssl.git] / crypto / pem / pem_lib.c
index bb2597b92109d3e4d41d2dd519c3af58d3b81a75..449a1fe9849c9aaa2381f1880de784ad938b9c61 100644 (file)
@@ -378,7 +378,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x,
 #endif
                        kstr=(unsigned char *)buf;
                        }
-               RAND_seed(data,i);/* put in the RSA key. */
+               RAND_add(data,i,0);/* put in the RSA key. */
                RAND_bytes(iv,8);       /* Generate a salt */
                /* The 'iv' is used as the iv and as a salt.  It is
                 * NOT taken from the BytesToKey function */