summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-01-15 20:24:12 +0000
committerBodo Möller <bodo@openssl.org>2000-01-15 20:24:12 +0000
commit691401fc53cc14cd98ac885e842e1e8370280abc (patch)
tree98f6f667999158db5de1e178bb8a4bade5bbc871 /crypto
parent4fd2ead09dfc35b5eaae1fb1ff449ebd1e54d08e (diff)
RAND_bytes's return values is 0 for an error, not -1.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/p_seal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p_seal.c b/crypto/evp/p_seal.c
index 7966545e21..e372f138c7 100644
--- a/crypto/evp/p_seal.c
+++ b/crypto/evp/p_seal.c
@@ -73,7 +73,7 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek,
int i;
if (npubk <= 0) return(0);
- if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) == -1) return(0);
+ if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0) return(0);
if (type->iv_len > 0)
RAND_bytes(iv,type->iv_len);