mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-08 18:54:23 +02:00
Refine the detect code to enable early data or not
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
@@ -2010,14 +2010,12 @@ usage:
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
||||
int early_data_enabled = 0;
|
||||
int early_data_enabled = MBEDTLS_SSL_EARLY_DATA_DISABLED;
|
||||
size_t early_data_len;
|
||||
if (strlen(opt.early_data_file) > 0 &&
|
||||
ssl_early_data_read_file(opt.early_data_file,
|
||||
&early_data, &early_data_len) == 0) {
|
||||
ssl_read_file_text(opt.early_data_file,
|
||||
&early_data, &early_data_len) == 0) {
|
||||
early_data_enabled = MBEDTLS_SSL_EARLY_DATA_ENABLED;
|
||||
} else {
|
||||
early_data_enabled = MBEDTLS_SSL_EARLY_DATA_DISABLED;
|
||||
}
|
||||
mbedtls_ssl_conf_early_data(&conf, early_data_enabled);
|
||||
#endif /* MBEDTLS_SSL_EARLY_DATA */
|
||||
|
||||
Reference in New Issue
Block a user