Skip to content

Commit 5501111

Browse files
authored
Merge pull request #9265 from douzzer/20251002-misc-clang-tidy-and-fips-fixes
20251002-misc-clang-tidy-and-fips-fixes
2 parents db6a4df + 408e6f7 commit 5501111

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

tests/api/test_dtls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ int test_dtls_bogus_finished_epoch_zero(void)
15331533
test_memio_clear_buffer(&test_ctx, 0);
15341534
ExpectIntEQ(test_memio_inject_message(&test_ctx, 1,
15351535
(const char*)server_hello_done_message, sizeof(server_hello_done_message)), 0);
1536-
wolfSSL_connect(ssl_c);
1536+
ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
15371537

15381538
/* verifying no ClientHello replay occurred,
15391539
* buffer should empty since we exit early on

wolfcrypt/test/test.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23616,10 +23616,12 @@ static wc_test_ret_t dh_ffdhe_test(WC_RNG *rng, int name)
2361623616

2361723617
/* wc_DhGeneratePublic_fips() was added in 5.2.3, but some customers are
2361823618
* building with configure scripts that set version to 5.2.1, but with 5.2.3
23619-
* wolfCrypt sources.
23619+
* wolfCrypt sources. 5.3.0 is used for both fips-v5-ready and v5-kcapi,
23620+
* and are also missing wc_DhGeneratePublic().
2362023621
*/
2362123622
#if !(defined(HAVE_SELFTEST) || \
2362223623
(defined(HAVE_FIPS) && FIPS_VERSION3_LT(5,2,3)) || \
23624+
FIPS_VERSION3_EQ(5,3,0) || \
2362323625
FIPS_VERSION3_EQ(6,0,0) || \
2362423626
defined(NO_WC_DHGENERATEPUBLIC))
2362523627

@@ -23654,7 +23656,7 @@ static wc_test_ret_t dh_ffdhe_test(WC_RNG *rng, int name)
2365423656
if (pubSz != pubSz2 || XMEMCMP(pub, pub2, pubSz)) {
2365523657
ERROR_OUT(WC_TEST_RET_ENC_NC, done);
2365623658
}
23657-
#endif /* !(HAVE_SELFTEST || FIPS <5.2.3 || FIPS == 6.0.0 || NO_WC_DHGENERATEPUBLIC */
23659+
#endif /* !(NO_WC_DHGENERATEPUBLIC || HAVE_SELFTEST || FIPS <5.2.3 || == 5.3.0 || == 6.0.0 */
2365823660

2365923661
#if (defined(WOLFSSL_HAVE_SP_DH) || defined(USE_FAST_MATH)) && \
2366023662
!defined(HAVE_INTEL_QA)

0 commit comments

Comments
 (0)