Mbed TLS v4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
config_adjust_ssl.h
Go to the documentation of this file.
1 
19 /*
20  * Copyright The Mbed TLS Contributors
21  * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
22  */
23 
24 #ifndef MBEDTLS_CONFIG_ADJUST_SSL_H
25 #define MBEDTLS_CONFIG_ADJUST_SSL_H
26 
27 #if !defined(MBEDTLS_CONFIG_FILES_READ)
28 #error "Do not include mbedtls/config_adjust_*.h manually! This can lead to problems, " \
29  "up to and including runtime errors such as buffer overflows. " \
30  "If you're trying to fix a complaint from check_config.h, just remove " \
31  "it from your configuration file: since Mbed TLS 3.0, it is included " \
32  "automatically at the right point."
33 #endif /* */
34 
35 /* The following blocks make it easier to disable all of TLS,
36  * or of TLS 1.2 or 1.3 or DTLS, without having to manually disable all
37  * key exchanges, options and extensions related to them. */
38 
39 #if !defined(MBEDTLS_SSL_TLS_C)
40 #undef MBEDTLS_SSL_CLI_C
41 #undef MBEDTLS_SSL_SRV_C
42 #undef MBEDTLS_SSL_PROTO_TLS1_3
43 #undef MBEDTLS_SSL_PROTO_TLS1_2
44 #undef MBEDTLS_SSL_PROTO_DTLS
45 #endif
46 
47 #if !(defined(MBEDTLS_SSL_SRV_C) && defined(MBEDTLS_SSL_SESSION_TICKETS))
48 #undef MBEDTLS_SSL_TICKET_C
49 #endif
50 
51 #if !defined(MBEDTLS_SSL_PROTO_DTLS)
52 #undef MBEDTLS_SSL_DTLS_ANTI_REPLAY
53 #undef MBEDTLS_SSL_DTLS_CONNECTION_ID
54 #undef MBEDTLS_SSL_DTLS_HELLO_VERIFY
55 #undef MBEDTLS_SSL_DTLS_SRTP
56 #undef MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
57 #endif
58 
59 #if !defined(MBEDTLS_SSL_PROTO_TLS1_2)
60 #undef MBEDTLS_SSL_ENCRYPT_THEN_MAC
61 #undef MBEDTLS_SSL_EXTENDED_MASTER_SECRET
62 #undef MBEDTLS_SSL_RENEGOTIATION
63 #undef MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
64 #undef MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
65 #undef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
66 #undef MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
67 #undef MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
68 #endif
69 
70 #if !defined(MBEDTLS_SSL_PROTO_TLS1_3)
71 #undef MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
72 #undef MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
73 #undef MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
74 #undef MBEDTLS_SSL_EARLY_DATA
75 #undef MBEDTLS_SSL_RECORD_SIZE_LIMIT
76 #endif
77 
78 #if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \
79  (defined(PSA_WANT_ALG_ECDH) || defined(PSA_WANT_ALG_ECDSA) || \
80  defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED))
81 #define MBEDTLS_SSL_TLS1_2_SOME_ECC
82 #endif
83 
84 #endif /* MBEDTLS_CONFIG_ADJUST_SSL_H */