Merge branch 'development' into sha3
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
commit
d06c6fc45b
405 changed files with 28422 additions and 16737 deletions
|
@ -55,7 +55,8 @@
|
|||
* library/padlock.h
|
||||
*
|
||||
* Required by:
|
||||
* MBEDTLS_AESNI_C
|
||||
* MBEDTLS_AESCE_C
|
||||
* MBEDTLS_AESNI_C (on some platforms)
|
||||
* MBEDTLS_PADLOCK_C
|
||||
*
|
||||
* Comment to disable the use of assembly code.
|
||||
|
@ -237,6 +238,7 @@
|
|||
//#define MBEDTLS_PLATFORM_VSNPRINTF_ALT
|
||||
//#define MBEDTLS_PLATFORM_NV_SEED_ALT
|
||||
//#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
|
||||
//#define MBEDTLS_PLATFORM_MS_TIME_ALT
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_DEPRECATED_WARNING
|
||||
|
@ -705,7 +707,7 @@
|
|||
* - Changes the behaviour of TLS 1.2 clients (not servers) when using the
|
||||
* ECDHE-ECDSA key exchange (not other key exchanges) to make all ECC
|
||||
* computations restartable:
|
||||
* - ECDH operations from the key exchange, only for Short Weierstass
|
||||
* - ECDH operations from the key exchange, only for Short Weierstrass
|
||||
* curves, only when MBEDTLS_USE_PSA_CRYPTO is not enabled.
|
||||
* - verification of the server's key exchange signature;
|
||||
* - verification of the server's certificate chain;
|
||||
|
@ -800,7 +802,7 @@
|
|||
*
|
||||
* Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
|
||||
*
|
||||
* Requires: MBEDTLS_ECDH_C
|
||||
* Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
|
||||
*
|
||||
* This enables the following ciphersuites (if other requisites are
|
||||
* enabled as well):
|
||||
|
@ -898,7 +900,9 @@
|
|||
*
|
||||
* Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
|
||||
*
|
||||
* Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
|
||||
* Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
|
||||
* MBEDTLS_RSA_C
|
||||
* MBEDTLS_PKCS1_V15
|
||||
* MBEDTLS_X509_CRT_PARSE_C
|
||||
*
|
||||
* This enables the following ciphersuites (if other requisites are
|
||||
|
@ -921,7 +925,9 @@
|
|||
*
|
||||
* Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
|
||||
*
|
||||
* Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
|
||||
* Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
|
||||
* MBEDTLS_ECDSA_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDSA)
|
||||
* MBEDTLS_X509_CRT_PARSE_C
|
||||
*
|
||||
* This enables the following ciphersuites (if other requisites are
|
||||
* enabled as well):
|
||||
|
@ -943,7 +949,9 @@
|
|||
*
|
||||
* Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
|
||||
*
|
||||
* Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C
|
||||
* Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
|
||||
* MBEDTLS_ECDSA_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDSA)
|
||||
* MBEDTLS_X509_CRT_PARSE_C
|
||||
*
|
||||
* This enables the following ciphersuites (if other requisites are
|
||||
* enabled as well):
|
||||
|
@ -965,7 +973,9 @@
|
|||
*
|
||||
* Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
|
||||
*
|
||||
* Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_X509_CRT_PARSE_C
|
||||
* Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
|
||||
* MBEDTLS_RSA_C
|
||||
* MBEDTLS_X509_CRT_PARSE_C
|
||||
*
|
||||
* This enables the following ciphersuites (if other requisites are
|
||||
* enabled as well):
|
||||
|
@ -991,10 +1001,14 @@
|
|||
* Thread v1.0.0 specification; incompatible changes to the specification
|
||||
* might still happen. For this reason, this is disabled by default.
|
||||
*
|
||||
* Requires: MBEDTLS_ECJPAKE_C
|
||||
* SHA-256 (via MD if present, or via PSA, see MBEDTLS_ECJPAKE_C)
|
||||
* Requires: MBEDTLS_ECJPAKE_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_JPAKE)
|
||||
* SHA-256 (via MBEDTLS_SHA256_C or a PSA driver)
|
||||
* MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
*
|
||||
* \warning If SHA-256 is provided only by a PSA driver, you must call
|
||||
* psa_crypto_init() before the first hanshake (even if
|
||||
* MBEDTLS_USE_PSA_CRYPTO is disabled).
|
||||
*
|
||||
* This enables the following ciphersuites (if other requisites are
|
||||
* enabled as well):
|
||||
* MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
|
||||
|
@ -1175,15 +1189,10 @@
|
|||
*
|
||||
* Enable support for PKCS#1 v2.1 encoding.
|
||||
*
|
||||
* Requires: MBEDTLS_RSA_C and (MBEDTLS_MD_C or MBEDTLS_PSA_CRYPTO_C).
|
||||
* Requires: MBEDTLS_RSA_C
|
||||
*
|
||||
* \warning If building without MBEDTLS_MD_C, you must call psa_crypto_init()
|
||||
* before doing any PKCS#1 v2.1 operation.
|
||||
*
|
||||
* \warning When building with MBEDTLS_MD_C, all hashes used with this
|
||||
* need to be available as built-ins (that is, for SHA-256, MBEDTLS_SHA256_C,
|
||||
* etc.) as opposed to just PSA drivers. So far, PSA drivers are only used by
|
||||
* this module in builds where MBEDTLS_MD_C is disabled.
|
||||
* \warning If using a hash that is only provided by PSA drivers, you must
|
||||
* call psa_crypto_init() before doing any PKCS#1 v2.1 operation.
|
||||
*
|
||||
* This enables support for RSAES-OAEP and RSASSA-PSS operations.
|
||||
*/
|
||||
|
@ -1221,18 +1230,6 @@
|
|||
*/
|
||||
//#define MBEDTLS_PSA_CRYPTO_CLIENT
|
||||
|
||||
/** \def MBEDTLS_PSA_CRYPTO_DRIVERS
|
||||
*
|
||||
* Enable support for the experimental PSA crypto driver interface.
|
||||
*
|
||||
* Requires: MBEDTLS_PSA_CRYPTO_C
|
||||
*
|
||||
* \warning This interface is experimental. We intend to maintain backward
|
||||
* compatibility with application code that relies on drivers,
|
||||
* but the driver interfaces may change without notice.
|
||||
*/
|
||||
//#define MBEDTLS_PSA_CRYPTO_DRIVERS
|
||||
|
||||
/** \def MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
|
||||
*
|
||||
* Make the PSA Crypto module use an external random generator provided
|
||||
|
@ -1547,19 +1544,34 @@
|
|||
*/
|
||||
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_RECORD_SIZE_LIMIT
|
||||
*
|
||||
* Enable support for RFC 8449 record_size_limit extension in SSL (TLS 1.3 only).
|
||||
*
|
||||
* \warning This extension is currently in development and must NOT be used except
|
||||
* for testing purposes.
|
||||
*
|
||||
* Requires: MBEDTLS_SSL_PROTO_TLS1_3
|
||||
*
|
||||
* Uncomment this macro to enable support for the record_size_limit extension
|
||||
*/
|
||||
//#define MBEDTLS_SSL_RECORD_SIZE_LIMIT
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_PROTO_TLS1_2
|
||||
*
|
||||
* Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
|
||||
*
|
||||
* Requires: Without MBEDTLS_USE_PSA_CRYPTO: MBEDTLS_MD_C and
|
||||
* (MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C)
|
||||
* (MBEDTLS_SHA256_C or MBEDTLS_SHA384_C or
|
||||
* SHA-256 or SHA-512 provided by a PSA driver)
|
||||
* With MBEDTLS_USE_PSA_CRYPTO:
|
||||
* PSA_WANT_ALG_SHA_1 or PSA_WANT_ALG_SHA_256 or
|
||||
* PSA_WANT_ALG_SHA_512
|
||||
* PSA_WANT_ALG_SHA_256 or PSA_WANT_ALG_SHA_384
|
||||
*
|
||||
* \warning If building with MBEDTLS_USE_PSA_CRYPTO, you must call
|
||||
* psa_crypto_init() before doing any TLS operations.
|
||||
* \warning If building with MBEDTLS_USE_PSA_CRYPTO, or if the hash(es) used
|
||||
* are only provided by PSA drivers, you must call psa_crypto_init() before
|
||||
* doing any TLS operations.
|
||||
*
|
||||
* Comment this macro to disable support for TLS 1.2 / DTLS 1.2
|
||||
*/
|
||||
|
@ -1578,11 +1590,14 @@
|
|||
* Requires: MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
|
||||
* Requires: MBEDTLS_PSA_CRYPTO_C
|
||||
*
|
||||
* Note: even though TLS 1.3 depends on PSA Crypto, and uses it unconditionally
|
||||
* for most operations, if you want it to only use PSA for all crypto
|
||||
* operations, you need to also enable MBEDTLS_USE_PSA_CRYPTO; otherwise X.509
|
||||
* operations, and functions that are common with TLS 1.2 (record protection,
|
||||
* running handshake hash) will still use non-PSA crypto.
|
||||
* \note TLS 1.3 uses PSA crypto for cryptographic operations that are
|
||||
* directly performed by TLS 1.3 code. As a consequence, you must
|
||||
* call psa_crypto_init() before the first TLS 1.3 handshake.
|
||||
*
|
||||
* \note Cryptographic operations performed indirectly via another module
|
||||
* (X.509, PK) or by code shared with TLS 1.2 (record protection,
|
||||
* running handshake hash) only use PSA crypto if
|
||||
* #MBEDTLS_USE_PSA_CRYPTO is enabled.
|
||||
*
|
||||
* Uncomment this macro to enable the support for TLS 1.3.
|
||||
*/
|
||||
|
@ -1627,8 +1642,11 @@
|
|||
*
|
||||
* Enable TLS 1.3 ephemeral key exchange mode.
|
||||
*
|
||||
* Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C, MBEDTLS_ECDSA_C or
|
||||
* MBEDTLS_PKCS1_V21
|
||||
* Requires: PSA_WANT_ALG_ECDH
|
||||
* MBEDTLS_X509_CRT_PARSE_C
|
||||
* and at least one of:
|
||||
* MBEDTLS_ECDSA_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDSA)
|
||||
* MBEDTLS_PKCS1_V21
|
||||
*
|
||||
* Comment to disable support for the ephemeral key exchange mode in TLS 1.3.
|
||||
* If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
|
||||
|
@ -1642,7 +1660,7 @@
|
|||
*
|
||||
* Enable TLS 1.3 PSK ephemeral key exchange mode.
|
||||
*
|
||||
* Requires: MBEDTLS_ECDH_C
|
||||
* Requires: PSA_WANT_ALG_ECDH
|
||||
*
|
||||
* Comment to disable support for the PSK ephemeral key exchange mode in
|
||||
* TLS 1.3. If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not
|
||||
|
@ -1651,45 +1669,6 @@
|
|||
*/
|
||||
#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE
|
||||
*
|
||||
* Maximum time difference in milliseconds tolerated between the age of a
|
||||
* ticket from the server and client point of view.
|
||||
* From the client point of view, the age of a ticket is the time difference
|
||||
* between the time when the client proposes to the server to use the ticket
|
||||
* (time of writing of the Pre-Shared Key Extension including the ticket) and
|
||||
* the time the client received the ticket from the server.
|
||||
* From the server point of view, the age of a ticket is the time difference
|
||||
* between the time when the server receives a proposition from the client
|
||||
* to use the ticket and the time when the ticket was created by the server.
|
||||
* The server age is expected to be always greater than the client one and
|
||||
* MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE defines the
|
||||
* maximum difference tolerated for the server to accept the ticket.
|
||||
* This is not used in TLS 1.2.
|
||||
*
|
||||
*/
|
||||
#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH
|
||||
*
|
||||
* Size in bytes of a ticket nonce. This is not used in TLS 1.2.
|
||||
*
|
||||
* This must be less than 256.
|
||||
*/
|
||||
#define MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH 32
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS
|
||||
*
|
||||
* Default number of NewSessionTicket messages to be sent by a TLS 1.3 server
|
||||
* after handshake completion. This is not used in TLS 1.2 and relevant only if
|
||||
* the MBEDTLS_SSL_SESSION_TICKETS option is enabled.
|
||||
*
|
||||
*/
|
||||
#define MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS 1
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_EARLY_DATA
|
||||
*
|
||||
|
@ -1943,19 +1922,26 @@
|
|||
/**
|
||||
* \def MBEDTLS_USE_PSA_CRYPTO
|
||||
*
|
||||
* Make the X.509 and TLS library use PSA for cryptographic operations, and
|
||||
* enable new APIs for using keys handled by 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.
|
||||
*
|
||||
* \note See docs/use-psa-crypto.md for a complete description of what this
|
||||
* option currently does, and of parts that are not affected by it so far.
|
||||
*
|
||||
* \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.
|
||||
* 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.
|
||||
*
|
||||
* \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.
|
||||
*
|
||||
* \note See docs/use-psa-crypto.md for a complete description this option.
|
||||
*
|
||||
* Requires: MBEDTLS_PSA_CRYPTO_C.
|
||||
*
|
||||
|
@ -2054,42 +2040,53 @@
|
|||
/**
|
||||
* \def MBEDTLS_AESNI_C
|
||||
*
|
||||
* Enable AES-NI support on x86-64.
|
||||
* Enable AES-NI support on x86-64 or x86-32.
|
||||
*
|
||||
* \note AESNI is only supported with certain compilers and target options:
|
||||
* - Visual Studio 2013: supported.
|
||||
* - GCC, x86-64, target not explicitly supporting AESNI:
|
||||
* requires MBEDTLS_HAVE_ASM.
|
||||
* - GCC, x86-32, target not explicitly supporting AESNI:
|
||||
* not supported.
|
||||
* - GCC, x86-64 or x86-32, target supporting AESNI: supported.
|
||||
* For this assembly-less implementation, you must currently compile
|
||||
* `library/aesni.c` and `library/aes.c` with machine options to enable
|
||||
* SSE2 and AESNI instructions: `gcc -msse2 -maes -mpclmul` or
|
||||
* `clang -maes -mpclmul`.
|
||||
* - Non-x86 targets: this option is silently ignored.
|
||||
* - Other compilers: this option is silently ignored.
|
||||
*
|
||||
* \note
|
||||
* Above, "GCC" includes compatible compilers such as Clang.
|
||||
* The limitations on target support are likely to be relaxed in the future.
|
||||
*
|
||||
* Module: library/aesni.c
|
||||
* Caller: library/aes.c
|
||||
*
|
||||
* Requires: MBEDTLS_HAVE_ASM
|
||||
* Requires: MBEDTLS_HAVE_ASM (on some platforms, see note)
|
||||
*
|
||||
* This modules adds support for the AES-NI instructions on x86-64
|
||||
* This modules adds support for the AES-NI instructions on x86.
|
||||
*/
|
||||
#define MBEDTLS_AESNI_C
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_AESCE_C
|
||||
*
|
||||
* Enable AES crypto extension support on Arm64.
|
||||
* Enable AES cryptographic extension support on 64-bit Arm.
|
||||
*
|
||||
* Module: library/aesce.c
|
||||
* Caller: library/aes.c
|
||||
*
|
||||
* Requires: MBEDTLS_HAVE_ASM, MBEDTLS_AES_C
|
||||
* Requires: MBEDTLS_AES_C
|
||||
*
|
||||
* \note The code uses Neon intrinsics, so \c CFLAGS must be set to a minimum
|
||||
* of \c -march=armv8-a+crypto .
|
||||
* \warning Runtime detection only works on Linux. For non-Linux operating
|
||||
* system, Armv8-A Cryptographic Extensions must be supported by
|
||||
* the CPU when this option is enabled.
|
||||
*
|
||||
* \warning If the target architecture is set to something that includes the
|
||||
* SHA3 feature (e.g. `-march=armv8.2-a+sha3`), for example because
|
||||
* `MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT` is desired, compilers
|
||||
* generate code for `MBEDTLS_AESCE_C` that includes instructions
|
||||
* only present with the (optional) SHA3 feature. This will lead to an
|
||||
* undefined instruction exception if the code is run on a CPU without
|
||||
* that feature.
|
||||
* \note Minimum compiler versions for this feature are Clang 4.0,
|
||||
* GCC 6.0 or MSVC 2019 version 16.11.2.
|
||||
*
|
||||
* \warning Runtime detection only works on linux. For non-linux operation
|
||||
* system, crypto extension MUST be supported by CPU.
|
||||
*
|
||||
* This module adds support for the AES crypto instructions on Arm64
|
||||
* This module adds support for the AES Armv8-A Cryptographic Extensions on Aarch64 systems.
|
||||
*/
|
||||
#define MBEDTLS_AESCE_C
|
||||
|
||||
|
@ -2535,13 +2532,8 @@
|
|||
*
|
||||
* Requires: MBEDTLS_ECP_C and either MBEDTLS_MD_C or MBEDTLS_PSA_CRYPTO_C
|
||||
*
|
||||
* \warning If building without MBEDTLS_MD_C, you must call psa_crypto_init()
|
||||
* before doing any EC J-PAKE operations.
|
||||
*
|
||||
* \warning When building with MBEDTLS_MD_C, all hashes used with this
|
||||
* need to be available as built-ins (that is, for SHA-256, MBEDTLS_SHA256_C,
|
||||
* etc.) as opposed to just PSA drivers. So far, PSA drivers are only used by
|
||||
* this module in builds where MBEDTLS_MD_C is disabled.
|
||||
* \warning If using a hash that is only provided by PSA drivers, you must
|
||||
* call psa_crypto_init() before doing any EC J-PAKE operations.
|
||||
*/
|
||||
#define MBEDTLS_ECJPAKE_C
|
||||
|
||||
|
@ -2671,11 +2663,12 @@
|
|||
/**
|
||||
* \def MBEDTLS_MD_C
|
||||
*
|
||||
* Enable the generic message digest layer.
|
||||
* Enable the generic layer for message digest (hashing) and HMAC.
|
||||
*
|
||||
* Requires: one of: MBEDTLS_MD5_C, MBEDTLS_RIPEMD160_C, MBEDTLS_SHA1_C,
|
||||
* MBEDTLS_SHA224_C, MBEDTLS_SHA256_C, MBEDTLS_SHA384_C,
|
||||
* MBEDTLS_SHA512_C.
|
||||
* MBEDTLS_SHA512_C, or MBEDTLS_PSA_CRYPTO_C with at least
|
||||
* one hash.
|
||||
* Module: library/md.c
|
||||
* Caller: library/constant_time.c
|
||||
* library/ecdsa.c
|
||||
|
@ -2806,6 +2799,10 @@
|
|||
* library/x509_csr.c
|
||||
*
|
||||
* Requires: MBEDTLS_BASE64_C
|
||||
* optionally MBEDTLS_MD5_C, or PSA Crypto with MD5 (see below)
|
||||
*
|
||||
* \warning When parsing password-protected files, if MD5 is provided only by
|
||||
* a PSA driver, you must call psa_crypto_init() before the first file.
|
||||
*
|
||||
* This modules adds support for decoding / parsing PEM files.
|
||||
*/
|
||||
|
@ -2881,15 +2878,11 @@
|
|||
*
|
||||
* Module: library/pkcs5.c
|
||||
*
|
||||
* Requires: MBEDTLS_CIPHER_C and either MBEDTLS_MD_C or MBEDTLS_PSA_CRYPTO_C.
|
||||
* Requires: MBEDTLS_CIPHER_C
|
||||
* Auto-enables: MBEDTLS_MD_C
|
||||
*
|
||||
* \warning If building without MBEDTLS_MD_C, you must call psa_crypto_init()
|
||||
* before doing any PKCS5 operation.
|
||||
*
|
||||
* \warning When building with MBEDTLS_MD_C, all hashes used with this
|
||||
* need to be available as built-ins (that is, for SHA-256, MBEDTLS_SHA256_C,
|
||||
* etc.) as opposed to just PSA drivers. So far, PSA drivers are only used by
|
||||
* this module in builds where MBEDTLS_MD_C is disabled.
|
||||
* \warning If using a hash that is only provided by PSA drivers, you must
|
||||
* call psa_crypto_init() before doing any PKCS5 operations.
|
||||
*
|
||||
* This module adds support for the PKCS#5 functions.
|
||||
*/
|
||||
|
@ -2898,11 +2891,7 @@
|
|||
/**
|
||||
* \def MBEDTLS_PKCS7_C
|
||||
*
|
||||
* This feature is a work in progress and not ready for production. Testing and
|
||||
* validation is incomplete, and handling of malformed inputs may not be robust.
|
||||
* The API may change.
|
||||
*
|
||||
* Enable PKCS7 core for using PKCS7 formatted signatures.
|
||||
* Enable PKCS #7 core for using PKCS #7-formatted signatures.
|
||||
* RFC Link - https://tools.ietf.org/html/rfc2315
|
||||
*
|
||||
* Module: library/pkcs7.c
|
||||
|
@ -2911,9 +2900,9 @@
|
|||
* MBEDTLS_X509_CRT_PARSE_C MBEDTLS_X509_CRL_PARSE_C,
|
||||
* MBEDTLS_BIGNUM_C, MBEDTLS_MD_C
|
||||
*
|
||||
* This module is required for the PKCS7 parsing modules.
|
||||
* This module is required for the PKCS #7 parsing modules.
|
||||
*/
|
||||
//#define MBEDTLS_PKCS7_C
|
||||
#define MBEDTLS_PKCS7_C
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_PKCS12_C
|
||||
|
@ -2927,13 +2916,8 @@
|
|||
* Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C and either
|
||||
* MBEDTLS_MD_C or MBEDTLS_PSA_CRYPTO_C.
|
||||
*
|
||||
* \warning If building without MBEDTLS_MD_C, you must call psa_crypto_init()
|
||||
* before doing any PKCS12 operation.
|
||||
*
|
||||
* \warning When building with MBEDTLS_MD_C, all hashes used with this
|
||||
* need to be available as built-ins (that is, for SHA-256, MBEDTLS_SHA256_C,
|
||||
* etc.) as opposed to just PSA drivers. So far, PSA drivers are only used by
|
||||
* this module in builds where MBEDTLS_MD_C is disabled.
|
||||
* \warning If using a hash that is only provided by PSA drivers, you must
|
||||
* call psa_crypto_init() before doing any PKCS12 operations.
|
||||
*
|
||||
* This module enables PKCS#12 functions.
|
||||
*/
|
||||
|
@ -2990,8 +2974,8 @@
|
|||
* Enable dynamic secure element support in the Platform Security Architecture
|
||||
* cryptography API.
|
||||
*
|
||||
* \deprecated This feature is deprecated. Please switch to the driver
|
||||
* interface enabled by #MBEDTLS_PSA_CRYPTO_DRIVERS.
|
||||
* \deprecated This feature is deprecated. Please switch to the PSA driver
|
||||
* interface.
|
||||
*
|
||||
* Module: library/psa_crypto_se.c
|
||||
*
|
||||
|
@ -3695,6 +3679,8 @@
|
|||
//#define MBEDTLS_PLATFORM_VSNPRINTF_MACRO vsnprintf /**< Default vsnprintf macro to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO int64_t //#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO int64_t /**< Default milliseconds time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled. It must be signed, and at least 64 bits. If it is changed from the default, MBEDTLS_PRINTF_MS_TIME must be updated to match.*/
|
||||
//#define MBEDTLS_PRINTF_MS_TIME PRId64 /**< Default fmt for printf. That's avoid compiler warning if mbedtls_ms_time_t is redefined */
|
||||
|
||||
/** \def MBEDTLS_CHECK_RETURN
|
||||
*
|
||||
|
@ -3837,7 +3823,7 @@
|
|||
*/
|
||||
//#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
|
||||
|
||||
//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
|
||||
//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 or 384 bits) */
|
||||
//#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
|
||||
|
||||
/**
|
||||
|
@ -3854,6 +3840,45 @@
|
|||
*/
|
||||
//#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE
|
||||
*
|
||||
* Maximum time difference in milliseconds tolerated between the age of a
|
||||
* ticket from the server and client point of view.
|
||||
* From the client point of view, the age of a ticket is the time difference
|
||||
* between the time when the client proposes to the server to use the ticket
|
||||
* (time of writing of the Pre-Shared Key Extension including the ticket) and
|
||||
* the time the client received the ticket from the server.
|
||||
* From the server point of view, the age of a ticket is the time difference
|
||||
* between the time when the server receives a proposition from the client
|
||||
* to use the ticket and the time when the ticket was created by the server.
|
||||
* The server age is expected to be always greater than the client one and
|
||||
* MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE defines the
|
||||
* maximum difference tolerated for the server to accept the ticket.
|
||||
* This is not used in TLS 1.2.
|
||||
*
|
||||
*/
|
||||
#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH
|
||||
*
|
||||
* Size in bytes of a ticket nonce. This is not used in TLS 1.2.
|
||||
*
|
||||
* This must be less than 256.
|
||||
*/
|
||||
#define MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH 32
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS
|
||||
*
|
||||
* Default number of NewSessionTicket messages to be sent by a TLS 1.3 server
|
||||
* after handshake completion. This is not used in TLS 1.2 and relevant only if
|
||||
* the MBEDTLS_SSL_SESSION_TICKETS option is enabled.
|
||||
*
|
||||
*/
|
||||
#define MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS 1
|
||||
|
||||
/* X509 options */
|
||||
//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
|
||||
//#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
|
||||
|
@ -3906,4 +3931,18 @@
|
|||
*/
|
||||
//#define MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
|
||||
|
||||
/**
|
||||
* Uncomment to enable p256-m, which implements ECC key generation, ECDH,
|
||||
* and ECDSA for SECP256R1 curves. This driver is used as an example to
|
||||
* document how a third-party driver or software accelerator can be integrated
|
||||
* to work alongside Mbed TLS.
|
||||
*
|
||||
* \warning p256-m has only been included to serve as a sample implementation
|
||||
* of how a driver/accelerator can be integrated alongside Mbed TLS. It is not
|
||||
* intended for use in production. p256-m files in Mbed TLS are not updated
|
||||
* regularly, so they may not contain upstream fixes/improvements.
|
||||
* DO NOT ENABLE/USE THIS MACRO IN PRODUCTION BUILDS!
|
||||
*/
|
||||
//#define MBEDTLS_P256M_EXAMPLE_DRIVER_ENABLED
|
||||
|
||||
/** \} name SECTION: Module configuration options */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue