Skip to content

Commit f10bbcc

Browse files
authored
Merge pull request #12127 from Frauschi/mlkem-only-tls-config
Fix TLS builds where ML-KEM is the only key exchange
2 parents feed47e + 98c0444 commit f10bbcc

8 files changed

Lines changed: 226 additions & 22 deletions

File tree

‎.github/workflows/cmake.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,38 @@ jobs:
111111
cd ..
112112
rm -rf build
113113
114+
# ML-KEM as the only key exchange
115+
- name: Build wolfssl with ML-KEM as the only key exchange
116+
run: |
117+
mkdir build
118+
cd build
119+
cmake -DWOLFSSL_ECC:BOOL=no -DWOLFSSL_DH:BOOL=no \
120+
-DWOLFSSL_CURVE25519:BOOL=no -DWOLFSSL_ED25519:BOOL=no \
121+
-DWOLFSSL_CURVE448:BOOL=no -DWOLFSSL_ED448:BOOL=no \
122+
..
123+
cmake --build .
124+
ctest -j $(nproc) --output-on-failure
125+
126+
# clean up
127+
cd ..
128+
rm -rf build
129+
130+
# ML-KEM as the only key exchange, TLS 1.2 kept on request
131+
- name: Build wolfssl with ML-KEM only and explicit TLS 1.2
132+
run: |
133+
mkdir build
134+
cd build
135+
cmake -DWOLFSSL_ECC:BOOL=no -DWOLFSSL_DH:BOOL=no \
136+
-DWOLFSSL_CURVE25519:BOOL=no -DWOLFSSL_ED25519:BOOL=no \
137+
-DWOLFSSL_CURVE448:BOOL=no -DWOLFSSL_ED448:BOOL=no \
138+
-DWOLFSSL_TLSV12:BOOL=yes \
139+
..
140+
cmake --build .
141+
142+
# clean up
143+
cd ..
144+
rm -rf build
145+
114146
# Option plumbing: a declared option must reach both the library and
115147
# options.h, and a -D that is not an option must reach neither.
116148
- name: Check option to options.h plumbing

‎.github/workflows/disable-pk-algs.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ jobs:
8080
"comment": "the group compat APIs with FFDHE as the only group",
8181
"configure": ["--enable-rsa", "--enable-dh",
8282
"--enable-opensslextra"]},
83+
{"name": "rsa-mlkem",
84+
"comment": "ML-KEM is the only key exchange, so TLS 1.2 is disabled",
85+
"configure": ["--enable-rsa"]},
86+
{"name": "rsa-mlkem-tlsv12",
87+
"comment": "explicit --enable-tlsv12 keeps TLS 1.2 with no cipher suite",
88+
"check": false,
89+
"configure": ["--enable-rsa", "--enable-tlsv12"]},
90+
{"name": "rsa-mlkem1024-subset-static",
91+
"comment": "--enable-mlkem with a sub-option list; static for test_tls_parse.c",
92+
"configure": ["--enable-rsa", "--enable-mlkem=1024,make,enc,dec,small",
93+
"--disable-shared"]},
8394
{"name": "rsa-key-to-der-original-asn", "minutes": 0.3,
8495
"check": false,
8596
"configure": ["--enable-rsa", "--enable-asn=original",

‎CMakeLists.txt‎

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,10 +1260,6 @@ add_option(WOLFSSL_TLS_NO_MLKEM_STANDALONE
12601260
"Disable ML-KEM as standalone TLS key exchange (non-hybrid) (default: enabled, i.e. standalone disabled)"
12611261
"yes" "yes;no")
12621262

1263-
if (WOLFSSL_TLS_NO_MLKEM_STANDALONE)
1264-
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_TLS_NO_MLKEM_STANDALONE")
1265-
endif()
1266-
12671263
# PQ/T hybrid combinations
12681264
add_option(WOLFSSL_PQC_HYBRIDS
12691265
"Enable PQ/T hybrid combinations (default: enabled)"
@@ -2880,9 +2876,20 @@ endif()
28802876
if (NOT WOLFSSL_ECC AND
28812877
(NOT WOLFSSL_RSA OR NOT WOLFSSL_DH) AND
28822878
(NOT WOLFSSL_CURVE25519 OR NOT WOLFSSL_ED25519) AND
2883-
(NOT WOLFSSL_CURVE448 AND NOT WOLFSSL_ED448))
2879+
(NOT WOLFSSL_CURVE448 AND NOT WOLFSSL_ED448) AND
2880+
NOT WOLFSSL_MLKEM)
28842881
override_cache(WOLFSSL_TLS13 "no")
28852882
endif()
2883+
# ML-KEM hybrids need an ECC, X25519 or X448 base.
2884+
if(WOLFSSL_TLS13 AND WOLFSSL_MLKEM AND WOLFSSL_TLS_NO_MLKEM_STANDALONE AND
2885+
NOT WOLFSSL_ECC AND NOT WOLFSSL_CURVE25519 AND NOT WOLFSSL_CURVE448)
2886+
message(STATUS "No ECC/Curve25519/Curve448 base for ML-KEM hybrids; "
2887+
"enabling standalone ML-KEM for TLS 1.3")
2888+
override_cache(WOLFSSL_TLS_NO_MLKEM_STANDALONE "no")
2889+
endif()
2890+
if(WOLFSSL_TLS_NO_MLKEM_STANDALONE)
2891+
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_TLS_NO_MLKEM_STANDALONE")
2892+
endif()
28862893
if (WOLFSSL_TLS13)
28872894
list(APPEND WOLFSSL_DEFINITIONS
28882895
"-DHAVE_SUPPORTED_CURVES"
@@ -2923,6 +2930,25 @@ else()
29232930
override_cache(WOLFSSL_SESSION_CACHE_REF "no")
29242931
endif()
29252932

2933+
# Without a classic key exchange TLS 1.2 and older have no cipher suite.
2934+
set(_wolfssl_kex_flags "${WOLFSSL_DEFINITIONS} ${CMAKE_C_FLAGS}")
2935+
if(WOLFSSL_TLS AND NOT WOLFSSL_CRYPT_ONLY AND WOLFSSL_TLSV12 AND
2936+
WOLFSSL_TLS13 AND WOLFSSL_MLKEM AND NOT WOLFSSL_DH AND NOT WOLFSSL_ECC AND
2937+
NOT WOLFSSL_CURVE25519 AND NOT WOLFSSL_CURVE448 AND NOT WOLFSSL_PSK AND
2938+
NOT WOLFSSL_LEAN_PSK AND NOT WOLFSSL_STUNNEL AND NOT WOLFSSL_MCAST AND
2939+
(NOT WOLFSSL_DTLS OR WOLFSSL_DTLS13) AND
2940+
NOT _wolfssl_kex_flags MATCHES
2941+
"-DWOLFSSL_STATIC_RSA|-DWOLFSSL_STATIC_DH|-DWOLFSSL_ALLOW_NO_SUITES|-DHAVE_CSHARP")
2942+
wolfssl_option_user_set(WOLFSSL_TLSV12 _wolfssl_user_tlsv12)
2943+
if(_wolfssl_user_tlsv12 OR WOLFSSL_OLD_TLS)
2944+
message(WARNING "TLS 1.2 kept with no cipher suite to negotiate.")
2945+
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_ALLOW_NO_SUITES")
2946+
else()
2947+
message(STATUS "TLS 1.2 has no key exchange; disabling it.")
2948+
override_cache(WOLFSSL_TLSV12 "no")
2949+
endif()
2950+
endif()
2951+
29262952
if(NOT WOLFSSL_TLSV12)
29272953
# A wolfCrypt-only build has no handshake to be left without, so only a
29282954
# build that keeps TLS has to agree on which versions remain.
@@ -2950,10 +2976,6 @@ if(NOT WOLFSSL_TLSV12)
29502976
"WOLFSSL_DTLS13=yes: DTLS 1.2 uses the TLS 1.2 handshake.")
29512977
endif()
29522978
endif()
2953-
# A TLS 1.3-only build without session tickets has no session to cache.
2954-
if(WOLFSSL_TLS13 AND NOT WOLFSSL_SESSION_TICKET)
2955-
list(APPEND WOLFSSL_DEFINITIONS "-DNO_SESSION_CACHE")
2956-
endif()
29572979
# NO_OLD_TLS is already in the list: the check above leaves
29582980
# WOLFSSL_OLD_TLS off, which is what adds it.
29592981
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_NO_TLS12")
@@ -3485,6 +3507,13 @@ if(WOLFSSL_CLU)
34853507
list(REMOVE_ITEM WOLFSSL_DEFINITIONS "-DNO_DES3")
34863508
endif()
34873509

3510+
# A TLS 1.3-only build without session tickets has no session to cache.
3511+
if(NOT WOLFSSL_TLSV12 AND WOLFSSL_TLS13 AND NOT WOLFSSL_SESSION_TICKET AND
3512+
NOT WOLFSSL_DEFINITIONS MATCHES
3513+
"-DOPENSSL_ALL|-DWOLFSSL_NGINX|-DWOLFSSL_HAPROXY|-DHAVE_LIGHTY")
3514+
list(APPEND WOLFSSL_DEFINITIONS "-DNO_SESSION_CACHE")
3515+
endif()
3516+
34883517
# SHA-512 handshake transcript for TLS v1.3. Settled here rather than beside
34893518
# the option: WOLFSSL_SHA512 has no value until its own add_option() has run,
34903519
# and the WOLFSSL_CLU block above can still raise it afterwards.

‎configure.ac‎

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9177,7 +9177,7 @@ then
91779177
# base. If none of those is available, hybrids contribute no usable groups
91789178
# for TLS 1.3 key exchange. In that case, auto-enable standalone ML-KEM so
91799179
# TLS 1.3 has a functional KEM.
9180-
if test "$ENABLED_TLS13" = "yes" && test "$ENABLED_MLKEM" = "yes" && \
9180+
if test "$ENABLED_TLS13" = "yes" && test "$ENABLED_MLKEM" != "no" && \
91819181
test "$ENABLED_ML_KEM" != "no" && \
91829182
test "x$ENABLED_ECC" = "xno" && test "x$ENABLED_CURVE25519" = "xno" && \
91839183
test "x$ENABLED_CURVE448" = "xno"
@@ -10142,7 +10142,7 @@ then
1014210142
AC_MSG_ERROR([--enable-dtls13 requires TLS 1.3, but TLS 1.3 was disabled by an earlier prerequisite check (no key-exchange or signature algorithms reachable). Enable at least one of ECC, RSA+DH, Curve25519+Ed25519, Curve448+Ed448, PSK, or ML-KEM.])
1014310143
fi
1014410144
if test "$ENABLED_TLS13" = "yes" && (test "x$ENABLED_ECC" = "xyes" || \
10145-
test "$ENABLED_DH" != "no" || test "x$ENABLED_MLKEM" = "xyes")
10145+
test "$ENABLED_DH" != "no" || test "x$ENABLED_MLKEM" != "xno")
1014610146
then
1014710147
AM_CFLAGS="$AM_CFLAGS -DHAVE_SUPPORTED_CURVES"
1014810148
fi
@@ -10256,11 +10256,6 @@ then
1025610256
fi
1025710257
fi
1025810258

10259-
if test "$ENABLED_TLSV12" = "no" && test "$ENABLED_TLS13" = "yes" && test "x$ENABLED_SESSION_TICKET" = "xno"
10260-
then
10261-
AM_CFLAGS="$AM_CFLAGS -DNO_SESSION_CACHE"
10262-
fi
10263-
1026410259
# Compile out TLS 1.2 itself, not just its derived settings. Runs after the
1026510260
# bundles that turn the version off, so --enable-tinytls13 and friends land
1026610261
# here too. The check keeps the option idempotent for the FIPS bundles that
@@ -14181,6 +14176,48 @@ AS_IF([(test "x$ENABLED_DTLS" = "xno") && \
1418114176
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DTLS"
1418214177
ENABLED_DTLS=yes])
1418314178

14179+
# Without a classic key exchange TLS 1.2 and older have no cipher suite.
14180+
if test "$ENABLED_TLS" != "no" && test "$ENABLED_TLS13" = "yes" && \
14181+
test "$ENABLED_TLSV12" != "no" && test "$ENABLED_CRYPTONLY" != "yes" && \
14182+
test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && \
14183+
test "$ENABLED_CURVE25519" = "no" && test "$ENABLED_CURVE448" = "no" && \
14184+
test "$ENABLED_PSK" = "no" && test "$ENABLED_SNIFFER" = "no" && \
14185+
test "$ENABLED_MCAST" = "no" && \
14186+
(test "$ENABLED_DTLS" = "no" || test "$ENABLED_DTLS13" = "yes") && \
14187+
test "$ENABLED_MLKEM_STANDALONE" = "yes" && \
14188+
test "$ENABLED_MLKEM_MAKE_KEY" = "yes" && \
14189+
test "$ENABLED_MLKEM_DECAPSULATE" = "yes"
14190+
then
14191+
case "$AM_CFLAGS $CPPFLAGS $CFLAGS $EXTRA_CFLAGS $EXTRA_CPPFLAGS" in
14192+
*-DWOLFSSL_STATIC_RSA*|*-DWOLFSSL_STATIC_DH*|\
14193+
*-DWOLFSSL_ALLOW_NO_SUITES*|*-DHAVE_CSHARP*)
14194+
;;
14195+
*)
14196+
if test "$enable_tlsv12" = "yes" || test "$ENABLED_OLD_TLS" = "yes"
14197+
then
14198+
AC_MSG_WARN([TLS 1.2 kept with no cipher suite to negotiate.])
14199+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_NO_SUITES"
14200+
else
14201+
AC_MSG_NOTICE([TLS 1.2 has no key exchange; disabling it.])
14202+
ENABLED_TLSV12=no
14203+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_TLS12"
14204+
fi
14205+
;;
14206+
esac
14207+
fi
14208+
14209+
if test "$ENABLED_TLSV12" = "no" && test "$ENABLED_TLS13" = "yes" && \
14210+
test "x$ENABLED_SESSION_TICKET" = "xno"
14211+
then
14212+
case "$AM_CFLAGS $CPPFLAGS $CFLAGS $EXTRA_CFLAGS $EXTRA_CPPFLAGS" in
14213+
*-DOPENSSL_ALL*|*-DWOLFSSL_NGINX*|*-DWOLFSSL_HAPROXY*|*-DHAVE_LIGHTY*)
14214+
;;
14215+
*)
14216+
AM_CFLAGS="$AM_CFLAGS -DNO_SESSION_CACHE"
14217+
;;
14218+
esac
14219+
fi
14220+
1418414221
# --disable-tlsv12 compiles the pre-TLS-1.3 handshake out, so the versions and
1418514222
# features built on top of it cannot be left on, and something has to be left
1418614223
# to negotiate. Runs here because old TLS, DTLS and the version flags are all

‎tests/api/test_ossl_x509_str.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5367,7 +5367,7 @@ static int test_cvcb_ctx_ready_verify(WOLFSSL_CTX* ctx)
53675367
return TEST_SUCCESS;
53685368
}
53695369

5370-
#ifdef WC_ASN_UNKNOWN_EXT_CB
5370+
#if defined(HAVE_ECC) && !defined(NO_RSA) && defined(WC_ASN_UNKNOWN_EXT_CB)
53715371
static ctx_cb test_cvcb_ext_ready;
53725372
static int test_cvcb_ext32; /* use the 32-bit OID callback */
53735373

‎tests/api/test_session.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,8 @@ int test_wolfSSL_SESSION(void)
11861186
EXPECT_DECLS;
11871187
#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) && \
11881188
!defined(NO_RSA) && !defined(NO_SHA256) && \
1189-
defined(HAVE_IO_TESTS_DEPENDENCIES) && !defined(NO_SESSION_CACHE)
1189+
defined(HAVE_IO_TESTS_DEPENDENCIES) && !defined(NO_SESSION_CACHE) && \
1190+
(!defined(WOLFSSL_NO_TLS12) || defined(HAVE_SESSION_TICKET))
11901191
WOLFSSL* ssl = NULL;
11911192
WOLFSSL_CTX* ctx = NULL;
11921193
WOLFSSL_SESSION* sess = NULL;

‎tests/api/test_tls_parse.c‎

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
*/
2121

2222
#include <tests/unit.h>
23+
24+
#ifdef NO_INLINE
25+
#include <wolfssl/wolfcrypt/misc.h>
26+
#else
27+
#define WOLFSSL_MISC_INCLUDED
28+
#include <wolfcrypt/src/misc.c>
29+
#endif
30+
2331
#include <tests/utils.h>
2432
#include <tests/api/api.h>
2533
#include <tests/api/test_tls_parse.h>
@@ -29,6 +37,9 @@
2937
#ifndef NO_DH
3038
#include <wolfssl/wolfcrypt/dh.h>
3139
#endif
40+
#ifdef WOLFSSL_HAVE_MLKEM
41+
#include <wolfssl/wolfcrypt/wc_mlkem.h>
42+
#endif
3243

3344
/* Several helpers below are called only from test bodies whose feature guards
3445
* differ, so a configuration can compile in none of their callers. */
@@ -38,6 +49,16 @@
3849
#define TEST_TLS_PARSE_UNUSED
3950
#endif
4051

52+
#if defined(WOLFSSL_HAVE_MLKEM) && !defined(WOLFSSL_NO_ML_KEM)
53+
#if !defined(WOLFSSL_NO_ML_KEM_768)
54+
#define TEST_TLS_PARSE_MLKEM_GROUP WOLFSSL_ML_KEM_768
55+
#elif !defined(WOLFSSL_NO_ML_KEM_1024)
56+
#define TEST_TLS_PARSE_MLKEM_GROUP WOLFSSL_ML_KEM_1024
57+
#elif !defined(WOLFSSL_NO_ML_KEM_512)
58+
#define TEST_TLS_PARSE_MLKEM_GROUP WOLFSSL_ML_KEM_512
59+
#endif
60+
#endif
61+
4162
/* Helper to build a server-side WOLFSSL_CTX with a certificate/key loaded,
4263
* as required for wolfSSL_new() to succeed on a server context.
4364
*/
@@ -240,7 +261,7 @@ static void test_tls_parse_free_kse(WOLFSSL* ssl, KeyShareEntry* kse)
240261
wc_FreeDhKey((DhKey*)kse->key);
241262
}
242263
if (kse->privKey != NULL && kse->privKeyLen > 0)
243-
wc_ForceZero(kse->privKey, kse->privKeyLen);
264+
ForceZero(kse->privKey, kse->privKeyLen);
244265
#endif
245266
}
246267
else if (kse->group == WOLFSSL_ECC_X25519) {
@@ -262,9 +283,16 @@ static void test_tls_parse_free_kse(WOLFSSL* ssl, KeyShareEntry* kse)
262283
wc_curve448_free((curve448_key*)kse->key);
263284
#endif
264285
}
265-
/* ECC is the remaining group. A PQC key is not an ecc_key. */
266-
else if (!WOLFSSL_NAMED_GROUP_IS_PQC(kse->group) &&
267-
!WOLFSSL_NAMED_GROUP_IS_PQC_HYBRID(kse->group)) {
286+
else if (WOLFSSL_NAMED_GROUP_IS_PQC(kse->group)) {
287+
#ifdef WOLFSSL_HAVE_MLKEM
288+
if (kse->key != NULL)
289+
wc_MlKemKey_Free((MlKemKey*)kse->key);
290+
if (kse->privKey != NULL && kse->privKeyLen > 0)
291+
ForceZero(kse->privKey, kse->privKeyLen);
292+
#endif
293+
}
294+
/* ECC is the remaining group. */
295+
else if (!WOLFSSL_NAMED_GROUP_IS_PQC_HYBRID(kse->group)) {
268296
#ifdef HAVE_ECC
269297
if (kse->key != NULL) {
270298
#if defined(WC_ECC_NONBLOCK) && defined(WOLFSSL_ASYNC_CRYPT_SW) && \
@@ -3246,6 +3274,57 @@ int test_TLSX_KeyShare_gen(void)
32463274
#endif /* HAVE_ECC && HAVE_ECC_KEY_EXPORT &&
32473275
(!NO_ECC256 || HAVE_ALL_CURVES) && !NO_ECC_SECP &&
32483276
ECC_MIN_KEY_SZ <= 256 */
3277+
3278+
#if defined(TEST_TLS_PARSE_MLKEM_GROUP) && \
3279+
!defined(WOLFSSL_MLKEM_NO_MAKE_KEY) && \
3280+
!defined(WOLFSSL_MLKEM_NO_DECAPSULATE) && defined(HAVE_SUPPORTED_CURVES)
3281+
/* TLSX_KeyShare_GenPqcKeyClient(): a second call keeps the first key. */
3282+
ExpectNotNull(ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method()));
3283+
ExpectNotNull(ssl = wolfSSL_new(ctx));
3284+
if (ssl != NULL) {
3285+
KeyShareEntry* kse = NULL;
3286+
byte* pubKey = NULL;
3287+
3288+
ExpectNotNull(kse = (KeyShareEntry*)XMALLOC(sizeof(KeyShareEntry),
3289+
ssl->heap, DYNAMIC_TYPE_TLSX));
3290+
if (kse != NULL) {
3291+
XMEMSET(kse, 0, sizeof(*kse));
3292+
kse->group = TEST_TLS_PARSE_MLKEM_GROUP;
3293+
ExpectIntEQ(TLSX_KeyShare_GenKey(ssl, kse), 0);
3294+
ExpectNotNull(pubKey = kse->pubKey);
3295+
ExpectIntGT(kse->pubKeyLen, 0);
3296+
ExpectIntEQ(TLSX_KeyShare_GenKey(ssl, kse), 0);
3297+
ExpectPtrEq(kse->pubKey, pubKey);
3298+
test_tls_parse_free_kse(ssl, kse);
3299+
kse = NULL;
3300+
}
3301+
#if !defined(NO_TLS) && !defined(WOLFSSL_STATIC_MEMORY) && \
3302+
!defined(WOLFSSL_DEBUG_MEMORY) && defined(USE_WOLFSSL_MEMORY)
3303+
/* Key is generated. The next allocation, the list node, fails.
3304+
* A failed Expect skips the assignment, so drop the freed pointer. */
3305+
kse = NULL;
3306+
ExpectNotNull(kse = (KeyShareEntry*)XMALLOC(sizeof(KeyShareEntry),
3307+
ssl->heap, DYNAMIC_TYPE_TLSX));
3308+
if (kse != NULL) {
3309+
int pushFailRet;
3310+
3311+
XMEMSET(kse, 0, sizeof(*kse));
3312+
kse->group = TEST_TLS_PARSE_MLKEM_GROUP;
3313+
ExpectIntEQ(TLSX_KeyShare_GenKey(ssl, kse), 0);
3314+
ExpectNotNull(kse->pubKey);
3315+
pushFailRet = test_tls_parse_free_kse_push_fail(ssl, kse);
3316+
ExpectIntEQ(pushFailRet, 0);
3317+
}
3318+
#endif
3319+
}
3320+
wolfSSL_free(ssl);
3321+
ssl = NULL;
3322+
wolfSSL_CTX_free(ctx);
3323+
ctx = NULL;
3324+
#endif /* TEST_TLS_PARSE_MLKEM_GROUP && !WOLFSSL_MLKEM_NO_MAKE_KEY &&
3325+
!WOLFSSL_MLKEM_NO_DECAPSULATE && HAVE_SUPPORTED_CURVES */
3326+
(void)ctx;
3327+
(void)ssl;
32493328
#endif
32503329
return EXPECT_RESULT();
32513330
}

‎wolfssl/wolfcrypt/settings.h‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4034,6 +4034,21 @@
40344034
#endif
40354035
#endif /* HAVE_CMAC_KDF*/
40364036

4037+
/* Without a classic key exchange TLS 1.2 and older have no cipher suite. */
4038+
#if defined(WOLFSSL_TLS13) && !defined(WOLFCRYPT_ONLY) && !defined(NO_TLS) && \
4039+
defined(NO_DH) && !defined(HAVE_ECC) && !defined(HAVE_CURVE25519) && \
4040+
!defined(HAVE_CURVE448) && defined(NO_PSK) && \
4041+
!defined(WOLFSSL_STATIC_RSA) && !defined(WOLFSSL_STATIC_DH) && \
4042+
!defined(WOLFSSL_SNIFFER) && !defined(WOLFSSL_MULTICAST) && \
4043+
!defined(HAVE_CSHARP) && !defined(WOLFSSL_ALLOW_NO_SUITES) && \
4044+
!defined(WOLFSSL_ALLOW_TLSV10) && !defined(WOLFSSL_ALLOW_SSLV3) && \
4045+
(!defined(WOLFSSL_DTLS) || defined(WOLFSSL_DTLS13))
4046+
#undef WOLFSSL_NO_TLS12
4047+
#define WOLFSSL_NO_TLS12
4048+
#undef NO_OLD_TLS
4049+
#define NO_OLD_TLS
4050+
#endif
4051+
40374052
#if (defined(WOLFSSL_TLS13) && defined(WOLFSSL_NO_TLS12)) || \
40384053
(!defined(HAVE_AES_CBC) && defined(NO_DES3) && defined(NO_RC4) && \
40394054
!defined(HAVE_CAMELLIA) & !defined(HAVE_NULL_CIPHER))

0 commit comments

Comments
 (0)