Introduce a new early_data state in the state machine
[openssl.git] / include / openssl / ssl.h
index 934bb23b186a92935fb1ff26faec92fb279ed814..860edba4cf2efcf22e8a8b039faaafac973e3af8 100644 (file)
@@ -798,9 +798,9 @@ void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);
 SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);
 
 int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data);
-uint32_t SSL_CTX_get_max_early_data(SSL_CTX *ctx);
+uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx);
 int SSL_set_max_early_data(SSL *s, uint32_t max_early_data);
-uint32_t SSL_get_max_early_data(SSL_CTX *s);
+uint32_t SSL_get_max_early_data(const SSL_CTX *s);
 
 #ifdef __cplusplus
 }
@@ -899,7 +899,8 @@ typedef enum {
     TLS_ST_SW_KEY_UPDATE,
     TLS_ST_CW_KEY_UPDATE,
     TLS_ST_SR_KEY_UPDATE,
-    TLS_ST_CR_KEY_UPDATE
+    TLS_ST_CR_KEY_UPDATE,
+    TLS_ST_CW_EARLY_DATA
 } OSSL_HANDSHAKE_STATE;
 
 /*
@@ -1438,6 +1439,7 @@ __owur int SSL_SESSION_has_ticket(const SSL_SESSION *s);
 __owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s);
 void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick,
                             size_t *len);
+__owur uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s);
 __owur int SSL_copy_session_id(SSL *to, const SSL *from);
 __owur X509 *SSL_SESSION_get0_peer(SSL_SESSION *s);
 __owur int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,
@@ -1633,7 +1635,7 @@ long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void));
 # define SSL_EARLY_DATA_REJECTED    1
 # define SSL_EARLY_DATA_ACCEPTED    2
 
-__owur int SSL_get_early_data_status(SSL *s);
+__owur int SSL_get_early_data_status(const SSL *s);
 
 __owur int SSL_get_error(const SSL *s, int ret_code);
 __owur const char *SSL_get_version(const SSL *s);