mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
allow https server to accept and pass thru alpn protocols to the underlying esp-tls server
This commit is contained in:
parent
4b6d9c8ad3
commit
df5a25aa40
@ -99,6 +99,8 @@ struct httpd_ssl_config {
|
||||
|
||||
void *ssl_userdata; /*!< user data to add to the ssl context */
|
||||
esp_tls_handshake_callback cert_select_cb; /*!< Certificate selection callback to use */
|
||||
|
||||
const char** alpn_protos; /*!< Application protocols the server supports in order of prefernece. 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! */
|
||||
};
|
||||
|
||||
typedef struct httpd_ssl_config httpd_ssl_config_t;
|
||||
|
@ -212,6 +212,9 @@ static httpd_ssl_ctx_t *create_secure_context(const struct httpd_ssl_config *con
|
||||
|
||||
cfg->userdata = config->ssl_userdata;
|
||||
|
||||
|
||||
cfg->alpn_protos = config->alpn_protos;
|
||||
|
||||
#if defined(CONFIG_ESP_TLS_SERVER_CERT_SELECT_HOOK)
|
||||
cfg->cert_select_cb = config->cert_select_cb;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user