From d6f68fa3149102bc6778935c700af5c7b4044d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Fri, 3 Mar 2000 07:51:25 +0000 Subject: Fix for previous patch: If RAND_pseudo_bytes returns 0, this is not an error. --- crypto/asn1/p5_pbe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/asn1/p5_pbe.c') diff --git a/crypto/asn1/p5_pbe.c b/crypto/asn1/p5_pbe.c index 380c5283b1..a147ac3295 100644 --- a/crypto/asn1/p5_pbe.c +++ b/crypto/asn1/p5_pbe.c @@ -129,7 +129,7 @@ X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, } pbe->salt->length = saltlen; if (salt) memcpy (pbe->salt->data, salt, saltlen); - else if (RAND_pseudo_bytes (pbe->salt->data, saltlen) <= 0) + else if (RAND_pseudo_bytes (pbe->salt->data, saltlen) < 0) return NULL; if (!(astype = ASN1_TYPE_new())) { -- cgit v1.2.3