}
pbe->salt->length = saltlen;
if (salt) memcpy (pbe->salt->data, salt, saltlen);
- else if (RAND_bytes (pbe->salt->data, saltlen) <= 0)
+ else if (RAND_pseudo_bytes (pbe->salt->data, saltlen) <= 0)
return NULL;
if (!(astype = ASN1_TYPE_new())) {
if (!(osalt->data = Malloc (saltlen))) goto merr;
osalt->length = saltlen;
if (salt) memcpy (osalt->data, salt, saltlen);
- else if (RAND_bytes (osalt->data, saltlen) <= 0) goto merr;
+ else if (RAND_pseudo_bytes (osalt->data, saltlen) <= 0) goto merr;
if(iter <= 0) iter = PKCS5_DEFAULT_ITER;
if(!ASN1_INTEGER_set(kdf->iter, iter)) goto merr;
kstr=(unsigned char *)buf;
}
RAND_add(data,i,0);/* put in the RSA key. */
- if (RAND_bytes(iv,8) <= 0) /* Generate a salt */
+ if (RAND_pseudo_bytes(iv,8) <= 0) /* Generate a salt */
goto err;
/* The 'iv' is used as the iv and as a salt. It is
* NOT taken from the BytesToKey function */
return 0;
}
if (!salt) {
- if (RAND_bytes (p12->mac->salt->data, saltlen) <= 0)
+ if (RAND_pseudo_bytes (p12->mac->salt->data, saltlen) <= 0)
return 0;
}
else memcpy (p12->mac->salt->data, salt, saltlen);