提交 d6e92c0b 编写于 作者: P Pascal Cuoq 提交者: Kurt Roeckx

Properly check return type of DH_compute_key()

It returns -1 on error, not 0.
Signed-off-by: NKurt Roeckx <kurt@roeckx.be>
Reviewed-by: NRich Salz <rsalz@openssl.org>
MR #1231
上级 f92768e6
......@@ -515,9 +515,9 @@ static int run_rfc5114_tests(void)
* Work out shared secrets using both sides and compare with expected
* values.
*/
if (!DH_compute_key(Z1, dhB->pub_key, dhA))
if (DH_compute_key(Z1, dhB->pub_key, dhA) == -1)
goto bad_err;
if (!DH_compute_key(Z2, dhA->pub_key, dhB))
if (DH_compute_key(Z2, dhA->pub_key, dhB) == -1)
goto bad_err;
if (memcmp(Z1, td->Z, td->Z_len))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册