crypto: dh - Make public key test FIPS-only
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 21 Feb 2024 05:19:15 +0000 (13:19 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 1 Mar 2024 10:35:40 +0000 (18:35 +0800)
commitf66a211e8c5d9b1b0531364c1b16874b0499e0d2
tree9ced31bac6d0fe2e57973aa0311adb64c2b32085
parenta24e3b583ea2db3418f0c6ae1f12b07ca96531cc
crypto: dh - Make public key test FIPS-only

The function dh_is_pubkey_valid was added to for FIPS but it was
only partially conditional to fips_enabled.

In particular, the first test in the function relies on the last
test to work properly, but the last test is only run in FIPS mode.

Fix this inconsistency by making the whole function conditional
on fips_enabled.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/dh.c