diff options
author | Bodo Möller <bodo@openssl.org> | 2000-03-03 07:51:25 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-03-03 07:51:25 +0000 |
commit | d6f68fa3149102bc6778935c700af5c7b4044d7d (patch) | |
tree | 3d77118b24f5544f9b9f4c34148b662a4cb83e38 /crypto/pem | |
parent | 645820f27312908bde98c10310701f11f0ba6073 (diff) | |
download | openssl-d6f68fa3149102bc6778935c700af5c7b4044d7d.tar.gz |
Fix for previous patch: If RAND_pseudo_bytes returns 0, this is not an error.
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index b19ad2c818..b5e0a650f8 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -373,7 +373,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x, kstr=(unsigned char *)buf; } RAND_add(data,i,0);/* put in the RSA key. */ - if (RAND_pseudo_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 */ |