Revert "tls13: Introduce early_data_state SSL context field"
This reverts commit 0883b8b625a5531f2fc8a61b6b0417f00f76f91e.
Due to the scope reduction of mbedtls_ssl_read_early_data()
it is not necessary anymore to refine the usage
of early_data_status/state rather the opposite.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 50a8cd2..72db821 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -1099,7 +1099,13 @@
}
#if defined(MBEDTLS_SSL_EARLY_DATA)
- ssl->early_data_state.cli = 0;
+#if defined(MBEDTLS_SSL_SRV_C)
+ MBEDTLS_STATIC_ASSERT(MBEDTLS_SSL_EARLY_DATA_STATUS_UNKNOWN == 0,
+ "MBEDTLS_SSL_EARLY_DATA_STATUS_UNKNOWN not equal to 0");
+#endif
+ MBEDTLS_STATIC_ASSERT(MBEDTLS_SSL_EARLY_DATA_STATUS_NOT_SENT == 0,
+ "MBEDTLS_SSL_EARLY_DATA_STATUS_NOT_SENT not equal to 0");
+ ssl->early_data_status = 0;
#endif
/* Initialize structures */