XenevaOS
Loading...
Searching...
No Matches
Macros
xeneva_mbedtls_config.h File Reference
#include "xeneva_psa_config.h"
Include dependency graph for xeneva_mbedtls_config.h:

Go to the source code of this file.

Macros

#define MBEDTLS_HAVE_ASM
 
#define MBEDTLS_HAVE_TIME
 
#define MBEDTLS_HAVE_TIME_DATE
 
#define MBEDTLS_PLATFORM_MS_TIME_ALT
 
#define MBEDTLS_PLATFORM_C
 
#define MBEDTLS_ENTROPY_C
 
#define MBEDTLS_CTR_DRBG_C
 
#define MBEDTLS_AES_C
 
#define MBEDTLS_CIPHER_C
 
#define MBEDTLS_GCM_C
 
#define MBEDTLS_CHACHA20_C
 
#define MBEDTLS_POLY1305_C
 
#define MBEDTLS_CHACHAPOLY_C
 
#define MBEDTLS_MD_C
 
#define MBEDTLS_SHA1_C
 
#define MBEDTLS_SHA256_C
 
#define MBEDTLS_SHA512_C
 
#define MBEDTLS_HKDF_C
 
#define MBEDTLS_BIGNUM_C
 
#define MBEDTLS_OID_C
 
#define MBEDTLS_ASN1_PARSE_C
 
#define MBEDTLS_ASN1_WRITE_C
 
#define MBEDTLS_PK_C
 
#define MBEDTLS_PK_PARSE_C
 
#define MBEDTLS_PKCS1_V15
 
#define MBEDTLS_PKCS1_V21
 
#define MBEDTLS_RSA_C
 
#define MBEDTLS_ECP_C
 
#define MBEDTLS_ECDH_C
 
#define MBEDTLS_ECDSA_C
 
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
 
#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
 
#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
 
#define MBEDTLS_BASE64_C
 
#define MBEDTLS_PEM_PARSE_C
 
#define MBEDTLS_X509_USE_C
 
#define MBEDTLS_X509_CRT_PARSE_C
 
#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
 
#define MBEDTLS_X509_CHECK_KEY_USAGE
 
#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
 
#define MBEDTLS_SSL_TLS_C
 
#define MBEDTLS_SSL_CLI_C
 
#define MBEDTLS_SSL_PROTO_TLS1_2
 
#define MBEDTLS_SSL_PROTO_TLS1_3
 
#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
 
#define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
 
#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
 
#define MBEDTLS_SSL_ALPN
 
#define MBEDTLS_SSL_SERVER_NAME_INDICATION
 
#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
 
#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
 
#define MBEDTLS_PSA_CRYPTO_C
 
SECTION: System support

This is an optional version symbol that enables compatibility handling of config files.

It is equal to the MBEDTLS_VERSION_NUMBER of the Mbed TLS version that introduced the config format we want to be compatible with.

This section sets system specific settings.

#define MBEDTLS_PLATFORM_MEMORY
 
SECTION: Mbed TLS feature support

This section sets support for features that are or are not needed within the modules that are enabled.

#define MBEDTLS_NO_PLATFORM_ENTROPY
 
#define MBEDTLS_ENTROPY_HARDWARE_ALT
 
#define MBEDTLS_AES_ROM_TABLES
 
#define MBEDTLS_PSA_CRYPTO_CONFIG
 
#define MBEDTLS_USE_PSA_CRYPTO
 

Macro Definition Documentation

◆ MBEDTLS_AES_C

#define MBEDTLS_AES_C

◆ MBEDTLS_AES_ROM_TABLES

#define MBEDTLS_AES_ROM_TABLES

Use precomputed AES tables stored in ROM.

Uncomment this macro to use precomputed AES tables stored in ROM. Comment this macro to generate AES tables in RAM at runtime.

Tradeoff: Using precomputed ROM tables reduces RAM usage by ~8kb (or ~2kb if MBEDTLS_AES_FEWER_TABLES is used) and reduces the initialization time before the first AES operation can be performed. It comes at the cost of additional ~8kb ROM use (resp. ~2kb if MBEDTLS_AES_FEWER_TABLES below is used), and potentially degraded performance if ROM access is slower than RAM access.

This option is independent of MBEDTLS_AES_FEWER_TABLES.

◆ MBEDTLS_ASN1_PARSE_C

#define MBEDTLS_ASN1_PARSE_C

◆ MBEDTLS_ASN1_WRITE_C

#define MBEDTLS_ASN1_WRITE_C

◆ MBEDTLS_BASE64_C

#define MBEDTLS_BASE64_C

◆ MBEDTLS_BIGNUM_C

#define MBEDTLS_BIGNUM_C

◆ MBEDTLS_CHACHA20_C

#define MBEDTLS_CHACHA20_C

◆ MBEDTLS_CHACHAPOLY_C

#define MBEDTLS_CHACHAPOLY_C

◆ MBEDTLS_CIPHER_C

#define MBEDTLS_CIPHER_C

◆ MBEDTLS_CTR_DRBG_C

#define MBEDTLS_CTR_DRBG_C

◆ MBEDTLS_ECDH_C

#define MBEDTLS_ECDH_C

◆ MBEDTLS_ECDSA_C

#define MBEDTLS_ECDSA_C

◆ MBEDTLS_ECP_C

#define MBEDTLS_ECP_C

◆ MBEDTLS_ECP_DP_CURVE25519_ENABLED

#define MBEDTLS_ECP_DP_CURVE25519_ENABLED

◆ MBEDTLS_ECP_DP_SECP256R1_ENABLED

#define MBEDTLS_ECP_DP_SECP256R1_ENABLED

◆ MBEDTLS_ECP_DP_SECP384R1_ENABLED

#define MBEDTLS_ECP_DP_SECP384R1_ENABLED

◆ MBEDTLS_ENTROPY_C

#define MBEDTLS_ENTROPY_C

◆ MBEDTLS_ENTROPY_HARDWARE_ALT

#define MBEDTLS_ENTROPY_HARDWARE_ALT

Uncomment this macro to let Mbed TLS use your own implementation of a hardware entropy collector.

Your function must be called mbedtls_hardware_poll(), have the same prototype as declared in library/entropy_poll.h, and accept NULL as first argument.

Uncomment to use your own hardware entropy collector.

◆ MBEDTLS_GCM_C

#define MBEDTLS_GCM_C

◆ MBEDTLS_HAVE_ASM

#define MBEDTLS_HAVE_ASM

XenevaOS client config for Mbed TLS 3.6. TLS 1.2 and TLS 1.3, certificate verification, no server and no DTLS. Apache-2.0 / GPL-2.0-or-later code stays in library/ and include/.

◆ MBEDTLS_HAVE_TIME

#define MBEDTLS_HAVE_TIME

◆ MBEDTLS_HAVE_TIME_DATE

#define MBEDTLS_HAVE_TIME_DATE

◆ MBEDTLS_HKDF_C

#define MBEDTLS_HKDF_C

◆ MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED

#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED

◆ MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED

#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED

◆ MBEDTLS_MD_C

#define MBEDTLS_MD_C

◆ MBEDTLS_NO_PLATFORM_ENTROPY

#define MBEDTLS_NO_PLATFORM_ENTROPY

Do not use built-in platform entropy functions. This is useful if your platform does not support standards like the /dev/urandom or Windows CryptoAPI.

Uncomment this macro to disable the built-in platform entropy functions.

◆ MBEDTLS_OID_C

#define MBEDTLS_OID_C

◆ MBEDTLS_PEM_PARSE_C

#define MBEDTLS_PEM_PARSE_C

◆ MBEDTLS_PK_C

#define MBEDTLS_PK_C

◆ MBEDTLS_PK_PARSE_C

#define MBEDTLS_PK_PARSE_C

◆ MBEDTLS_PKCS1_V15

#define MBEDTLS_PKCS1_V15

◆ MBEDTLS_PKCS1_V21

#define MBEDTLS_PKCS1_V21

◆ MBEDTLS_PLATFORM_C

#define MBEDTLS_PLATFORM_C

◆ MBEDTLS_PLATFORM_MEMORY

#define MBEDTLS_PLATFORM_MEMORY

Enable the memory allocation layer.

By default Mbed TLS uses the system-provided calloc() and free(). This allows different allocators (self-implemented or provided) to be provided to the platform abstraction layer.

Enabling MBEDTLS_PLATFORM_MEMORY without the MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and free() function pointer at runtime.

Enabling MBEDTLS_PLATFORM_MEMORY and specifying MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the alternate function at compile time.

An overview of how the value of mbedtls_calloc is determined:

  • if !MBEDTLS_PLATFORM_MEMORY
    • mbedtls_calloc = calloc
  • if MBEDTLS_PLATFORM_MEMORY
    • if (MBEDTLS_PLATFORM_CALLOC_MACRO && MBEDTLS_PLATFORM_FREE_MACRO):
      • mbedtls_calloc = MBEDTLS_PLATFORM_CALLOC_MACRO
    • if !(MBEDTLS_PLATFORM_CALLOC_MACRO && MBEDTLS_PLATFORM_FREE_MACRO):
      • Dynamic setup via mbedtls_platform_set_calloc_free is now possible with a default value MBEDTLS_PLATFORM_STD_CALLOC.
      • How is MBEDTLS_PLATFORM_STD_CALLOC handled?
      • if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS:
        • MBEDTLS_PLATFORM_STD_CALLOC is not set to anything;
        • MBEDTLS_PLATFORM_STD_MEM_HDR can be included if present;
      • if !MBEDTLS_PLATFORM_NO_STD_FUNCTIONS:
        • if MBEDTLS_PLATFORM_STD_CALLOC is present:
          • User-defined MBEDTLS_PLATFORM_STD_CALLOC is respected;
        • if !MBEDTLS_PLATFORM_STD_CALLOC:
          • MBEDTLS_PLATFORM_STD_CALLOC = calloc
      • At this point the presence of MBEDTLS_PLATFORM_STD_CALLOC is checked.
      • if !MBEDTLS_PLATFORM_STD_CALLOC
        • MBEDTLS_PLATFORM_STD_CALLOC = uninitialized_calloc
      • mbedtls_calloc = MBEDTLS_PLATFORM_STD_CALLOC.

Defining MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_STD_CALLOC at the same time is not possible. MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_FREE_MACRO must both be defined or undefined at the same time. MBEDTLS_PLATFORM_STD_CALLOC and MBEDTLS_PLATFORM_STD_FREE do not have to be defined at the same time, as, if they are used, dynamic setup of these functions is possible. See the tree above to see how are they handled in all cases. An uninitialized MBEDTLS_PLATFORM_STD_CALLOC always fails, returning a null pointer. An uninitialized MBEDTLS_PLATFORM_STD_FREE does not do anything.

Requires: MBEDTLS_PLATFORM_C

Enable this layer to allow use of alternative memory allocators.

◆ MBEDTLS_PLATFORM_MS_TIME_ALT

#define MBEDTLS_PLATFORM_MS_TIME_ALT

◆ MBEDTLS_POLY1305_C

#define MBEDTLS_POLY1305_C

◆ MBEDTLS_PSA_CRYPTO_C

#define MBEDTLS_PSA_CRYPTO_C

◆ MBEDTLS_PSA_CRYPTO_CONFIG

#define MBEDTLS_PSA_CRYPTO_CONFIG

This setting allows support for cryptographic mechanisms through the PSA API to be configured separately from support through the mbedtls API.

When this option is disabled, the PSA API exposes the cryptographic mechanisms that can be implemented on top of the mbedtls_xxx API configured with MBEDTLS_XXX symbols.

When this option is enabled, the PSA API exposes the cryptographic mechanisms requested by the PSA_WANT_XXX symbols defined in include/psa/crypto_config.h. The corresponding MBEDTLS_XXX settings are automatically enabled if required (i.e. if no PSA driver provides the mechanism). You may still freely enable additional MBEDTLS_XXX symbols in mbedtls_config.h.

If the symbol MBEDTLS_PSA_CRYPTO_CONFIG_FILE is defined, it specifies an alternative header to include instead of include/psa/crypto_config.h.

Warning
This option is experimental, in that the set of PSA_WANT_XXX symbols is not completely finalized yet, and the configuration tooling is not ideally adapted to having two separate configuration files. Future minor releases of Mbed TLS may make minor changes to those symbols, but we will endeavor to provide a transition path. Nonetheless, this option is considered mature enough to use in production, as long as you accept that you may need to make minor changes to psa/crypto_config.h when upgrading Mbed TLS.

◆ MBEDTLS_RSA_C

#define MBEDTLS_RSA_C

◆ MBEDTLS_SHA1_C

#define MBEDTLS_SHA1_C

◆ MBEDTLS_SHA256_C

#define MBEDTLS_SHA256_C

◆ MBEDTLS_SHA512_C

#define MBEDTLS_SHA512_C

◆ MBEDTLS_SSL_ALPN

#define MBEDTLS_SSL_ALPN

◆ MBEDTLS_SSL_CLI_C

#define MBEDTLS_SSL_CLI_C

◆ MBEDTLS_SSL_KEEP_PEER_CERTIFICATE

#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE

◆ MBEDTLS_SSL_PROTO_TLS1_2

#define MBEDTLS_SSL_PROTO_TLS1_2

◆ MBEDTLS_SSL_PROTO_TLS1_3

#define MBEDTLS_SSL_PROTO_TLS1_3

◆ MBEDTLS_SSL_SERVER_NAME_INDICATION

#define MBEDTLS_SSL_SERVER_NAME_INDICATION

◆ MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE

#define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE

◆ MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED

#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED

◆ MBEDTLS_SSL_TLS_C

#define MBEDTLS_SSL_TLS_C

◆ MBEDTLS_USE_PSA_CRYPTO

#define MBEDTLS_USE_PSA_CRYPTO

Make the X.509 and TLS libraries use PSA for cryptographic operations as much as possible, and enable new APIs for using keys handled by PSA Crypto.

Note
Development of this option is currently in progress, and parts of Mbed TLS's X.509 and TLS modules are not ported to PSA yet. However, these parts will still continue to work as usual, so enabling this option should not break backwards compatibility.
Warning
If you enable this option, you need to call psa_crypto_init() before calling any function from the SSL/TLS, X.509 or PK modules, except for the various mbedtls_xxx_init() functions which can be called at any time.
In multithreaded applications, you must also enable MBEDTLS_THREADING_C, unless only one thread ever calls PSA functions (psa_xxx()), including indirect calls through SSL/TLS, X.509 or PK.
Note
An important and desirable effect of this option is that it allows PK, X.509 and TLS to take advantage of PSA drivers. For example, enabling this option is what allows use of drivers for ECDSA, ECDH and EC J-PAKE in those modules. However, note that even with this option disabled, some code in PK, X.509, TLS or the crypto library might still use PSA drivers, if it can determine it's safe to do so; currently that's the case for hashes.
See docs/use-psa-crypto.md for a complete description this option.

Requires: MBEDTLS_PSA_CRYPTO_C.

Uncomment this to enable internal use of PSA Crypto and new associated APIs.

◆ MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE

#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE

◆ MBEDTLS_X509_CHECK_KEY_USAGE

#define MBEDTLS_X509_CHECK_KEY_USAGE

◆ MBEDTLS_X509_CRT_PARSE_C

#define MBEDTLS_X509_CRT_PARSE_C

◆ MBEDTLS_X509_RSASSA_PSS_SUPPORT

#define MBEDTLS_X509_RSASSA_PSS_SUPPORT

◆ MBEDTLS_X509_USE_C

#define MBEDTLS_X509_USE_C