Skip to content

Commit 1881841

Browse files
authored
Merge pull request #8744 from douzzer/20250507-fips-all
20250507-fips-all
2 parents cdeac13 + d3ce45f commit 1881841

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

configure.ac

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,6 @@ then
10441044
test "$enable_trustedca" = "" && enable_trustedca=yes
10451045
test "$enable_session_ticket" = "" && enable_session_ticket=yes
10461046
test "$enable_earlydata" = "" && enable_earlydata=yes
1047-
test "$enable_ech" = "" && enable_ech=yes
10481047
test "$enable_rpk" = "" && enable_rpk=yes
10491048

10501049
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
@@ -1066,6 +1065,7 @@ then
10661065

10671066
if test "$ENABLED_FIPS" = "no"
10681067
then
1068+
test "$enable_ech" = "" && enable_ech=yes
10691069
test "$enable_scep" = "" && enable_scep=yes
10701070
test "$enable_mcast" = "" && enable_mcast=yes
10711071
fi
@@ -1272,8 +1272,6 @@ then
12721272
test "$enable_certext" = "" && enable_certext=yes
12731273
test "$enable_sep" = "" && enable_sep=yes
12741274
test "$enable_hkdf" = "" && enable_hkdf=yes
1275-
test "$enable_curve25519" = "" && enable_curve25519=yes
1276-
test "$enable_curve448" = "" && enable_curve448=yes
12771275
test "$enable_fpecc" = "" && test "$enable_ecc" != "no" && enable_fpecc=yes
12781276
test "$enable_eccencrypt" = "" && test "$enable_ecc" != "no" && enable_eccencrypt=yes
12791277
test "$enable_psk" = "" && enable_psk=yes
@@ -1322,6 +1320,8 @@ then
13221320

13231321
if test "$ENABLED_FIPS" = "no"
13241322
then
1323+
test "$enable_curve25519" = "" && enable_curve25519=yes
1324+
test "$enable_curve448" = "" && enable_curve448=yes
13251325
test "$enable_cryptocb" = "" && enable_cryptocb=yes
13261326
test "$enable_pkcallbacks" = "" && enable_pkcallbacks=yes
13271327
test "$enable_xchacha" = "" && test "$enable_chacha" != "no" && enable_xchacha=yes
@@ -4442,7 +4442,7 @@ AC_ARG_ENABLE([curve25519],
44424442
[ ENABLED_CURVE25519=no ]
44434443
)
44444444

4445-
if test "$ENABLED_QUIC" = "yes" && test "$ENABLED_CURVE25519" = "no"
4445+
if test "$ENABLED_QUIC" = "yes" && test "$ENABLED_CURVE25519" = "no" && test "$ENABLED_FIPS" = "no"
44464446
then
44474447
ENABLED_CURVE25519=yes
44484448
fi
@@ -5627,13 +5627,17 @@ AS_CASE([$FIPS_VERSION],
56275627
AS_IF([test "x$ENABLED_ED25519" != "xyes" &&
56285628
(test "$FIPS_VERSION" != "dev" || test "$enable_ed25519" != "no")],
56295629
[ENABLED_ED25519="yes"; AM_CFLAGS="$AM_CFLAGS -DHAVE_ED25519 -DHAVE_ED25519_KEY_IMPORT"])
5630-
AS_IF([test "$ENABLED_CURVE25519" = "yes"],
5630+
5631+
AS_IF([test "$ENABLED_CURVE25519" != "no" &&
5632+
(test "$FIPS_VERSION" != "dev" || test "$enable_curve25519" = "")],
56315633
[ENABLED_CURVE25519="no"; AM_CFLAGS="$AM_CFLAGS"])
56325634
56335635
AS_IF([test "x$ENABLED_ED448" != "xyes" &&
56345636
(test "$FIPS_VERSION" != "dev" || test "$enable_ed448" != "no")],
56355637
[ENABLED_ED448="yes"; AM_CFLAGS="$AM_CFLAGS -DHAVE_ED448 -DHAVE_ED448_KEY_IMPORT"])
5636-
AS_IF([test "x$ENABLED_CURVE448" = "xyes"],
5638+
5639+
AS_IF([test "$ENABLED_CURVE448" != "no" &&
5640+
(test "$FIPS_VERSION" != "dev" || test "$enable_curve448" = "")],
56375641
[ENABLED_CURVE448="no"; AM_CFLAGS="$AM_CFLAGS"])
56385642
56395643
AS_IF([test "x$ENABLED_ED25519_STREAM" != "xyes" &&

tests/quic.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,10 +1509,19 @@ static int test_quic_key_share(int verbose) {
15091509
/*If that is supported by the server, expect a smooth handshake.*/
15101510
QuicTestContext_init(&tclient, ctx_c, "client", verbose);
15111511
QuicTestContext_init(&tserver, ctx_s, "server", verbose);
1512+
1513+
#ifdef HAVE_CURVE25519
15121514
ExpectTrue(wolfSSL_set1_curves_list(tclient.ssl, "X25519:P-256")
15131515
== WOLFSSL_SUCCESS);
15141516
ExpectTrue(wolfSSL_set1_curves_list(tserver.ssl, "X25519")
15151517
== WOLFSSL_SUCCESS);
1518+
#else
1519+
ExpectTrue(wolfSSL_set1_curves_list(tclient.ssl, "P-256:P-384")
1520+
== WOLFSSL_SUCCESS);
1521+
ExpectTrue(wolfSSL_set1_curves_list(tserver.ssl, "P-256")
1522+
== WOLFSSL_SUCCESS);
1523+
#endif
1524+
15161525
QuicConversation_init(&conv, &tclient, &tserver);
15171526
QuicConversation_do(&conv);
15181527
ExpectStrEQ(conv.rec_log,
@@ -1525,10 +1534,19 @@ static int test_quic_key_share(int verbose) {
15251534
/* If group is not supported by server, expect HelloRetry */
15261535
QuicTestContext_init(&tclient, ctx_c, "client", verbose);
15271536
QuicTestContext_init(&tserver, ctx_s, "server", verbose);
1537+
1538+
#ifdef HAVE_CURVE25519
15281539
ExpectTrue(wolfSSL_set1_curves_list(tclient.ssl, "X25519:P-256")
15291540
== WOLFSSL_SUCCESS);
15301541
ExpectTrue(wolfSSL_set1_curves_list(tserver.ssl, "P-256")
15311542
== WOLFSSL_SUCCESS);
1543+
#else
1544+
ExpectTrue(wolfSSL_set1_curves_list(tclient.ssl, "P-384:P-256")
1545+
== WOLFSSL_SUCCESS);
1546+
ExpectTrue(wolfSSL_set1_curves_list(tserver.ssl, "P-256")
1547+
== WOLFSSL_SUCCESS);
1548+
#endif
1549+
15321550
QuicConversation_init(&conv, &tclient, &tserver);
15331551
QuicConversation_do(&conv);
15341552
ExpectStrEQ(conv.rec_log,
@@ -1541,10 +1559,19 @@ static int test_quic_key_share(int verbose) {
15411559
/* If no group overlap, expect failure */
15421560
QuicTestContext_init(&tclient, ctx_c, "client", verbose);
15431561
QuicTestContext_init(&tserver, ctx_s, "server", verbose);
1562+
1563+
#ifdef HAVE_CURVE25519
15441564
ExpectTrue(wolfSSL_set1_curves_list(tclient.ssl, "P-256")
15451565
== WOLFSSL_SUCCESS);
15461566
ExpectTrue(wolfSSL_set1_curves_list(tserver.ssl, "X25519")
15471567
== WOLFSSL_SUCCESS);
1568+
#else
1569+
ExpectTrue(wolfSSL_set1_curves_list(tclient.ssl, "P-256")
1570+
== WOLFSSL_SUCCESS);
1571+
ExpectTrue(wolfSSL_set1_curves_list(tserver.ssl, "P-384")
1572+
== WOLFSSL_SUCCESS);
1573+
#endif
1574+
15481575
QuicConversation_init(&conv, &tclient, &tserver);
15491576
QuicConversation_fail(&conv);
15501577
ExpectIntEQ(wolfSSL_get_error(tserver.ssl, 0),

0 commit comments

Comments
 (0)