mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Introduce helper macro for presence of stream ciphersuites
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
@ -130,6 +130,15 @@
|
||||
* counter (8) + header (5) + IV(16) + MAC (16-48) + padding (0-256).
|
||||
*/
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_SSL3) || \
|
||||
defined(MBEDTLS_SSL_PROTO_TLS1) || \
|
||||
defined(MBEDTLS_SSL_PROTO_TLS1_1) || \
|
||||
defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
||||
#define MBEDTLS_SSL_PROTO_TLS1_2_OR_EARLIER
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_2_OR_EARLIER)
|
||||
|
||||
/* This macro determines whether CBC is supported. */
|
||||
#if defined(MBEDTLS_CIPHER_MODE_CBC) && \
|
||||
( defined(MBEDTLS_AES_C) || \
|
||||
@ -139,6 +148,12 @@
|
||||
#define MBEDTLS_SSL_SOME_SUITES_USE_CBC
|
||||
#endif
|
||||
|
||||
/* This macro determines whether a ciphersuite using a
|
||||
* stream cipher can be used. */
|
||||
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
||||
#define MBEDTLS_SSL_SOME_SUITES_USE_STREAM
|
||||
#endif
|
||||
|
||||
/* This macro determines whether the CBC construct used in TLS 1.0-1.2 is supported. */
|
||||
#if defined(MBEDTLS_SSL_SOME_SUITES_USE_CBC) && \
|
||||
( defined(MBEDTLS_SSL_PROTO_TLS1) || \
|
||||
@ -147,11 +162,13 @@
|
||||
#define MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_NULL_CIPHER) || \
|
||||
#if defined(MBEDTLS_SSL_SOME_SUITES_USE_STREAM) ||
|
||||
defined(MBEDTLS_SSL_SOME_SUITES_USE_CBC)
|
||||
#define MBEDTLS_SSL_SOME_SUITES_USE_MAC
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_2_OR_EARLIER */
|
||||
|
||||
#if defined(MBEDTLS_SSL_SOME_SUITES_USE_MAC)
|
||||
/* Ciphersuites using HMAC */
|
||||
#if defined(MBEDTLS_SHA512_C)
|
||||
|
Reference in New Issue
Block a user