Enforce that all SSL version bounds must be hardcoded simultaneously

This commit is contained in:
Hanno Becker 2019-07-05 11:20:49 +01:00
parent 94c40d17f7
commit cb8774b6e8

View file

@ -614,6 +614,18 @@
#error "MBEDTLS_SSL_DTLS_ANTI_REPLAY defined, but not all prerequisites" #error "MBEDTLS_SSL_DTLS_ANTI_REPLAY defined, but not all prerequisites"
#endif #endif
#if defined(MBEDTLS_SSL_CONF_MIN_MINOR_VER) || \
defined(MBEDTLS_SSL_CONF_MAX_MINOR_VER) || \
defined(MBEDTLS_SSL_CONF_MIN_MAJOR_VER) || \
defined(MBEDTLS_SSL_CONF_MAX_MAJOR_VER)
#if !( defined(MBEDTLS_SSL_CONF_MIN_MINOR_VER) && \
defined(MBEDTLS_SSL_CONF_MAX_MINOR_VER) && \
defined(MBEDTLS_SSL_CONF_MIN_MAJOR_VER) && \
defined(MBEDTLS_SSL_CONF_MAX_MAJOR_VER) )
#error "MBEDTLS_SSL_CONF_MIN_MINOR_VER, MBEDTLS_SSL_CONF_MAX_MINOR_VER, MBEDTLS_SSL_CONF_MIN_MAJOR_VER, MBEDTLS_SSL_CONF_MAX_MAJOR_VER must be defined simultaneously"
#endif
#endif
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) && \ #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) && \
( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) ) ( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) )
#error "MBEDTLS_SSL_DTLS_CONNECTION_ID defined, but not all prerequisites" #error "MBEDTLS_SSL_DTLS_CONNECTION_ID defined, but not all prerequisites"