mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
Merge pull request #3508 from JacobBarthelmeh/DH
fix for no filesystem build with DH test case
This commit is contained in:
@@ -15474,7 +15474,8 @@ static int dh_test(void)
|
||||
#endif
|
||||
|
||||
/* Test DH key import / export */
|
||||
#if defined(WOLFSSL_DH_EXTRA) && (!defined(HAVE_FIPS) || \
|
||||
#if defined(WOLFSSL_DH_EXTRA) && !defined(NO_FILESYSTEM) && \
|
||||
(!defined(HAVE_FIPS) || \
|
||||
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2)))
|
||||
wc_FreeDhKey(key);
|
||||
ret = wc_InitDhKey_ex(key, HEAP_HINT, devId);
|
||||
@@ -15496,8 +15497,14 @@ static int dh_test(void)
|
||||
if (ret != 0) {
|
||||
ERROR_OUT(-7951, done);
|
||||
}
|
||||
#else
|
||||
ret = wc_DhSetKey(key, dh_p, sizeof(dh_p), dh_g, sizeof(dh_g));
|
||||
if (ret != 0) {
|
||||
ERROR_OUT(-7951, done);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
privSz = DH_TEST_BUF_SIZE;
|
||||
pubSz = DH_TEST_BUF_SIZE;
|
||||
ret = wc_DhExportKeyPair(key, priv, &privSz, pub, &pubSz);
|
||||
|
Reference in New Issue
Block a user