summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_mutl.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/pkcs12/p12_mutl.c
parent645820f27312908bde98c10310701f11f0ba6073 (diff)
Fix for previous patch: If RAND_pseudo_bytes returns 0, this is not an error.
Diffstat (limited to 'crypto/pkcs12/p12_mutl.c')
-rw-r--r--crypto/pkcs12/p12_mutl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c
index 4e0a7cbed8..369257ed4c 100644
--- a/crypto/pkcs12/p12_mutl.c
+++ b/crypto/pkcs12/p12_mutl.c
@@ -157,7 +157,7 @@ int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
return 0;
}
if (!salt) {
- if (RAND_pseudo_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);