esp-tls: Add support for the CERTIFICATE SELECTION HOOK. The hook has access to required information so that the application can make a more informed decision on which certificate to serve (such as alpn value, server certificate type, etc.)

Closes https://github.com/espressif/esp-idf/pull/9833

Signed-off-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
This commit is contained in:
Akos Vandra
2022-09-26 16:14:09 +02:00
committed by BOT
parent 3c18cc482c
commit e9e3dc7904
5 changed files with 123 additions and 33 deletions

View File

@@ -96,6 +96,11 @@ struct httpd_ssl_config {
/** User callback for esp_https_server */
esp_https_server_user_cb *user_cb;
#if defined(CONFIG_ESP_TLS_SERVER_CERT_SELECT_HOOK)
esp_tls_handshake_callback cert_select_cb; /*!< Certificate selection callback to use */
#endif
void *ssl_userdata; /*!< user data to add to the ssl context */
};
typedef struct httpd_ssl_config httpd_ssl_config_t;