tls13: srv: Do not use early_data_status
Due to the scope reduction for
mbedtls_ssl_read_early_data(), on
server as early data state variable
we now only need a flag in the
handshake context indicating if
the server has accepted early data
or not.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/library/ssl_misc.h b/library/ssl_misc.h
index 9439408..c9632f9 100644
--- a/library/ssl_misc.h
+++ b/library/ssl_misc.h
@@ -650,6 +650,10 @@
/* Flag indicating if a CertificateRequest message has been sent
* to the client or not. */
uint8_t certificate_request_sent;
+#if defined(MBEDTLS_SSL_EARLY_DATA)
+ /* Flag indicating if the server has accepted early data or not. */
+ uint8_t early_data_accepted;
+#endif
#endif /* MBEDTLS_SSL_SRV_C */
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
@@ -2130,30 +2134,6 @@
unsigned char *buf,
const unsigned char *end,
size_t *out_len);
-
-#if defined(MBEDTLS_SSL_SRV_C)
-/* Additional internal early data status, server side only. */
-/*
- * The server has not received the ClientHello yet, the status of early data
- * is thus unknown.
- */
-#define MBEDTLS_SSL_EARLY_DATA_STATUS_UNKNOWN \
- MBEDTLS_SSL_EARLY_DATA_STATUS_NOT_SENT
-
-/*
- * The server has received the ClientHello, it contained no early data
- * extension.
- */
-#define MBEDTLS_SSL_EARLY_DATA_STATUS_NOT_RECEIVED 3
-
-/*
- * The server has received the early data extension, it has accepted early
- * data and received the end of early data message from the client marking the
- * end of early data reception.
- */
-#define MBEDTLS_SSL_EARLY_DATA_STATUS_END_OF_EARLY_DATA_RECEIVED 4
-#endif /* MBEDTLS_SSL_SRV_C */
-
#endif /* MBEDTLS_SSL_EARLY_DATA */
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */