mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
fix(esp-tls): Fixed the server session create API
Added the option to define tls_handshake_timeout value for the esp_tls_server_session_create API. At the moment, the API gets stuck infinitely if the handshake is blocked on recieving more data and the peer connection has closed due to some issue. Closes https://github.com/espressif/esp-idf/issues/14999
This commit is contained in:
@@ -132,6 +132,9 @@ struct httpd_ssl_config {
|
||||
* Used for negotiating during the TLS handshake, first one the client supports is selected.
|
||||
* The data structure must live as long as the https server itself */
|
||||
const char** alpn_protos;
|
||||
|
||||
/** TLS handshake timeout in milliseconds, default timeout is 10 seconds if not set */
|
||||
uint32_t tls_handshake_timeout_ms;
|
||||
};
|
||||
|
||||
typedef struct httpd_ssl_config httpd_ssl_config_t;
|
||||
@@ -190,6 +193,7 @@ typedef struct httpd_ssl_config httpd_ssl_config_t;
|
||||
.ssl_userdata = NULL, \
|
||||
.cert_select_cb = NULL, \
|
||||
.alpn_protos = NULL, \
|
||||
.tls_handshake_timeout_ms = 0 \
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user