mbedtls/programs/ssl
Hanno Becker f765ce617f Remove ExtendedMS configuration API if hardcoded at compile-time
If the ExtendedMasterSecret extension is configured at compile-time
by setting MBEDTLS_SSL_CONF_EXTENDED_MASTER_SECRET and/or
MBEDTLS_SSL_CONF_ENFORCE_EXTENDED_MASTER_SECRET, the runtime
configuration APIs mbedtls_ssl_conf_extended_master_secret()
and mbedtls_ssl_conf_extended_master_secret_enforce() must
either be removed or modified to take no effect (or at most
check that the runtime value matches the hardcoded one, but
that would undermine the code-size benefits the hardcoding
is supposed to bring in the first place).

Previously, the API was kept but modified to have no effect.
While convenient for us because we don't have to adapt example
applications, this comes at the danger of users calling the runtime
configuration API, forgetting that the respective fields are
potentially already hardcoded at compile-time - and hence silently
using a configuration they don't intend to use.

This commit changes the approach to removing the configuration
API in case the respective field is hardcoded at compile-time,
and exemplifies it in the only case implemented so far, namely
the configuration of the ExtendedMasterSecret extension.

It adapts ssl_client2 and ssl_server2 by omitting the call to
the corresponding API if MBEDTLS_SSL_CONF_XXX are defined and
removing the command line parameters for the runtime configuration
of the ExtendedMasterSecret extension.
2019-06-25 08:42:20 +01:00
..
CMakeLists.txt Improve cmake inclusion of query_config.c when building apps 2019-02-07 10:32:31 +00:00
dtls_client.c Rename MBEDTLS_X509_INFO to !MBEDTLS_X509_REMOVE_INFO 2019-06-18 11:05:44 +01:00
dtls_server.c Fix const-ness in mbedtls_param_failed() 2018-12-11 12:28:56 +01:00
mini_client.c Fix const-ness in mbedtls_param_failed() 2018-12-11 12:28:56 +01:00
query_config.c Exemplify harcoding SSL config at compile-time in example of ExtMS 2019-06-25 08:42:20 +01:00
ssl_client1.c Merge remote-tracking branch 'origin/pr/591' into baremetal 2019-06-18 17:36:45 +01:00
ssl_client2.c Remove ExtendedMS configuration API if hardcoded at compile-time 2019-06-25 08:42:20 +01:00
ssl_fork_server.c Use negated option for controlling TLS support. 2019-06-17 15:26:34 +02:00
ssl_mail_client.c Merge remote-tracking branch 'origin/pr/591' into baremetal 2019-06-18 17:36:45 +01:00
ssl_pthread_server.c Use negated option for controlling TLS support. 2019-06-17 15:26:34 +02:00
ssl_server.c Use negated option for controlling TLS support. 2019-06-17 15:26:34 +02:00
ssl_server2.c Remove ExtendedMS configuration API if hardcoded at compile-time 2019-06-25 08:42:20 +01:00