mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Added build option checks to tls.c and tls13.c
Set tls.c and tls13.c to abort if the library is built with TLS 1.3 and not HAVE_TLS_EXTENSIONS
This commit is contained in:
12
src/tls.c
12
src/tls.c
@ -63,12 +63,13 @@
|
|||||||
static int TLSX_KeyShare_IsSupported(int namedGroup);
|
static int TLSX_KeyShare_IsSupported(int namedGroup);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (!defined(NO_WOLFSSL_SERVER) && defined(WOLFSSL_TLS13) && \
|
#if ((!defined(NO_WOLFSSL_SERVER) && defined(WOLFSSL_TLS13) && \
|
||||||
!defined(WOLFSSL_NO_SERVER_GROUPS_EXT)) || \
|
!defined(WOLFSSL_NO_SERVER_GROUPS_EXT)) || \
|
||||||
(defined(WOLFSSL_TLS13) && !defined(HAVE_ECC) && \
|
(defined(WOLFSSL_TLS13) && !defined(HAVE_ECC) && \
|
||||||
!defined(HAVE_CURVE25519) && defined(HAVE_SUPPORTED_CURVES)) || \
|
!defined(HAVE_CURVE25519) && defined(HAVE_SUPPORTED_CURVES)) || \
|
||||||
((defined(HAVE_ECC) || defined(HAVE_CURVE25519)) && \
|
((defined(HAVE_ECC) || defined(HAVE_CURVE25519)) && \
|
||||||
defined(HAVE_SUPPORTED_CURVES))
|
defined(HAVE_SUPPORTED_CURVES))) && \
|
||||||
|
defined(HAVE_TLS_EXTENSIONS)
|
||||||
static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions);
|
static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -97,6 +98,13 @@ static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions);
|
|||||||
#if !defined(NO_RSA) && !defined(WC_RSA_PSS)
|
#if !defined(NO_RSA) && !defined(WC_RSA_PSS)
|
||||||
#error The build option WC_RSA_PSS is required for TLS 1.3 with RSA
|
#error The build option WC_RSA_PSS is required for TLS 1.3 with RSA
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef HAVE_TLS_EXTENSIONS
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#error "The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3"
|
||||||
|
#else
|
||||||
|
#pragma message("Error: The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3")
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Warn if secrets logging is enabled */
|
/* Warn if secrets logging is enabled */
|
||||||
|
@ -134,6 +134,14 @@
|
|||||||
#error The build option HAVE_HKDF is required for TLS 1.3
|
#error The build option HAVE_HKDF is required for TLS 1.3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_TLS_EXTENSIONS
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#error "The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3"
|
||||||
|
#else
|
||||||
|
#pragma message("error: The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3")
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Set ret to error value and jump to label.
|
/* Set ret to error value and jump to label.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user