diff options
author | Pascal Cuoq <cuoq@trust-in-soft.com> | 2015-05-06 09:55:28 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2015-10-07 18:54:12 +0200 |
commit | d6e92c0bd6c36fc68291e79ef5753fd7f0420695 (patch) | |
tree | e848b7e9ca1af8719611d14e83a1fc6704c306ef /test/dhtest.c | |
parent | f92768e6f5259069bd21dbed2b98b3423c1dfca4 (diff) |
Properly check return type of DH_compute_key()
It returns -1 on error, not 0.
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #1231
Diffstat (limited to 'test/dhtest.c')
-rw-r--r-- | test/dhtest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dhtest.c b/test/dhtest.c index 9ce92ee392..896af851ce 100644 --- a/test/dhtest.c +++ b/test/dhtest.c @@ -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)) |