DH EXTRA test: Disable DH test unless not FIPS or FIPS > 2

statickeys/dh-ffdhe2048.der is an alternate format that is supported
when WOLFSSL_DH_EXTRA is defined.
The decoding is not supported when FIPS and FIPS version is less than 3.
Fix test to not use file unless not FIPS or FIPS > 2.
This commit is contained in:
Sean Parkinson
2020-09-25 11:41:59 +10:00
parent 1668f6f626
commit c798c7f396

View File

@ -14913,7 +14913,8 @@ static int dh_test(void)
#endif
/* Test DH key import / export */
#ifdef WOLFSSL_DH_EXTRA
#if defined(WOLFSSL_DH_EXTRA) && (!defined(HAVE_FIPS) || \
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2)))
wc_FreeDhKey(key);
ret = wc_InitDhKey_ex(key, HEAP_HINT, devId);
if (ret != 0) {