mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 10:05:46 +01:00
Merge pull request #3136 from sbutcher-arm/additional-config-checks-2.16
Backport 2.16: Add additional sanity checks to check_config.h
This commit is contained in:
commit
984c1f77c5
@ -546,6 +546,23 @@
|
|||||||
#error "MBEDTLS_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
|
#error "MBEDTLS_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \
|
||||||
|
defined(MBEDTLS_SSL_PROTO_TLS1_1) || defined(MBEDTLS_SSL_PROTO_TLS1_2)) && \
|
||||||
|
!(defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) )
|
||||||
|
#error "One or more versions of the TLS protocol are enabled " \
|
||||||
|
"but no key exchange methods defined with MBEDTLS_KEY_EXCHANGE_xxxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS) && \
|
#if defined(MBEDTLS_SSL_PROTO_DTLS) && \
|
||||||
!defined(MBEDTLS_SSL_PROTO_TLS1_1) && \
|
!defined(MBEDTLS_SSL_PROTO_TLS1_1) && \
|
||||||
!defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
!defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
||||||
@ -669,6 +686,10 @@
|
|||||||
#error "MBEDTLS_X509_CREATE_C defined, but not all prerequisites"
|
#error "MBEDTLS_X509_CREATE_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_CERTS_C) && !defined(MBEDTLS_X509_USE_C)
|
||||||
|
#error "MBEDTLS_CERTS_C defined, but not all prerequisites"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_X509_CRT_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) )
|
#if defined(MBEDTLS_X509_CRT_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) )
|
||||||
#error "MBEDTLS_X509_CRT_PARSE_C defined, but not all prerequisites"
|
#error "MBEDTLS_X509_CRT_PARSE_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1063,7 +1063,7 @@ cleanup:
|
|||||||
mbedtls_x509_crt_free( &clicert );
|
mbedtls_x509_crt_free( &clicert );
|
||||||
#else
|
#else
|
||||||
((void) verbose);
|
((void) verbose);
|
||||||
#endif /* MBEDTLS_CERTS_C && MBEDTLS_SHA1_C */
|
#endif /* MBEDTLS_CERTS_C && MBEDTLS_SHA256_C */
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user