File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27625,24 +27625,24 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hpke_test(void)
2762527625 #endif
2762627626#endif
2762727627
27628- /* added this code to hit code coverage on lines 219-225 on hpke.c */
27628+ /* Test coverage for wc_HpkeInit with Curve448, even though it is not supported */
2762927629#if defined(HAVE_CURVE448) && \
2763027630 (defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512))
2763127631 /* test with_curve448 */
2763227632 ret = wc_HpkeInit(hpke, DHKEM_X448_HKDF_SHA512, HKDF_SHA512,
27633- HPKE_AES_128_GCM , NULL);
27633+ HPKE_AES_256_GCM , NULL);
2763427634
2763527635 if (ret != BAD_FUNC_ARG) /* Curve448 is not supported yet */
27636- return WC_TEST_RET_ENC_EC(ret);
27637-
27638- if (ret == 0)
27639- return ret;
27636+ ret = WC_TEST_RET_ENC_EC(ret);
27637+ else
27638+ ret = 0;
2764027639#endif
2764127640
2764227641#if defined(HAVE_CURVE25519)
2764327642 /* test with curve25519 and aes256 */
27644- ret = wc_HpkeInit(hpke, DHKEM_X25519_HKDF_SHA256, HKDF_SHA256,
27645- HPKE_AES_256_GCM, NULL);
27643+ if (ret == 0)
27644+ ret = wc_HpkeInit(hpke, DHKEM_X25519_HKDF_SHA256, HKDF_SHA256,
27645+ HPKE_AES_256_GCM, NULL);
2764627646
2764727647 if (ret != 0)
2764827648 return WC_TEST_RET_ENC_EC(ret);
You can’t perform that action at this time.
0 commit comments