summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/p5_pbe.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-03-03 07:51:25 +0000
committerBodo Möller <bodo@openssl.org>2000-03-03 07:51:25 +0000
commitd6f68fa3149102bc6778935c700af5c7b4044d7d (patch)
tree3d77118b24f5544f9b9f4c34148b662a4cb83e38 /crypto/asn1/p5_pbe.c
parent645820f27312908bde98c10310701f11f0ba6073 (diff)
Fix for previous patch: If RAND_pseudo_bytes returns 0, this is not an error.
Diffstat (limited to 'crypto/asn1/p5_pbe.c')
-rw-r--r--crypto/asn1/p5_pbe.c2
1 files changed, 1 insertions, 1 deletions
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())) {