mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04: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
|
#endif
|
||||||
|
|
||||||
/* Test DH key import / export */
|
/* 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)))
|
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2)))
|
||||||
wc_FreeDhKey(key);
|
wc_FreeDhKey(key);
|
||||||
ret = wc_InitDhKey_ex(key, HEAP_HINT, devId);
|
ret = wc_InitDhKey_ex(key, HEAP_HINT, devId);
|
||||||
@@ -15496,8 +15497,14 @@ static int dh_test(void)
|
|||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERROR_OUT(-7951, done);
|
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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
privSz = DH_TEST_BUF_SIZE;
|
privSz = DH_TEST_BUF_SIZE;
|
||||||
pubSz = DH_TEST_BUF_SIZE;
|
pubSz = DH_TEST_BUF_SIZE;
|
||||||
ret = wc_DhExportKeyPair(key, priv, &privSz, pub, &pubSz);
|
ret = wc_DhExportKeyPair(key, priv, &privSz, pub, &pubSz);
|
||||||
|
Reference in New Issue
Block a user