Return 0 on a non-matching kdf_type
authorMatt Caswell <matt@openssl.org>
Wed, 18 Apr 2018 11:03:41 +0000 (12:03 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 19 Apr 2018 07:49:40 +0000 (08:49 +0100)
commitc6c7bb010770cbf7d818d0ef8f5628decaa7e037
tree1c308fb250b712b818452ff6f7323fa62958b0ee
parent4571b3c8e06dc8d9fba003a3c9b9fb680f1bf223
Return 0 on a non-matching kdf_type

If we have a non-matching kdf_type then pkey_dh_derive silently succeeds.
It should fail. This is a "should not happen" condition anyway so the
impact is negligible.

Fixes #2440

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6000)
crypto/dh/dh_pmeth.c