mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-23 05:53:27 +03:00
feat(esp-tls): allow the TLS supported groups list to be configured
This commit is contained in:
committed by
Mahavir Jain
parent
2ef3e75c8c
commit
825c814e79
@@ -164,6 +164,13 @@ struct httpd_ssl_config {
|
||||
* Please check the list validity by esp_tls_get_ciphersuites_list() API.
|
||||
* This allows per-server cipher suite configuration. */
|
||||
const int *ciphersuites_list;
|
||||
|
||||
/** Pointer to a zero-terminated array of IANA identifiers of TLS supported groups,
|
||||
* the named groups that are used for key exchange.
|
||||
* Please check the list validity by esp_tls_get_supported_groups_list() API.
|
||||
* The array is not copied. It must stay valid for the lifetime of the server.
|
||||
* This allows per-server group configuration. */
|
||||
const uint16_t *groups_list;
|
||||
};
|
||||
|
||||
typedef struct httpd_ssl_config httpd_ssl_config_t;
|
||||
@@ -242,6 +249,7 @@ typedef struct httpd_ssl_config httpd_ssl_config_t;
|
||||
.tls_handshake_timeout_ms = 0, \
|
||||
.tls_version = ESP_TLS_VER_ANY, \
|
||||
.ciphersuites_list = NULL, \
|
||||
.groups_list = NULL, \
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -304,6 +304,7 @@ static esp_err_t create_secure_context(const struct httpd_ssl_config *config, ht
|
||||
|
||||
cfg->tls_version = config->tls_version;
|
||||
cfg->ciphersuites_list = config->ciphersuites_list;
|
||||
cfg->groups_list = config->groups_list;
|
||||
|
||||
#if defined(CONFIG_ESP_HTTPS_SERVER_CERT_SELECT_HOOK)
|
||||
cfg->cert_select_cb = config->cert_select_cb;
|
||||
|
||||
Reference in New Issue
Block a user