提交 691401fc 编写于 作者: B Bodo Möller

RAND_bytes's return values is 0 for an error, not -1.

上级 4fd2ead0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册