fix(esp_wifi): Code cleanup for PR#15550 PR#15551

Closes https://github.com/espressif/esp-idf/pull/15550
Closes https://github.com/espressif/esp-idf/pull/15551
This commit is contained in:
Kapil Gupta
2025-03-11 12:29:36 +05:30
committed by BOT
parent ab5d1819d9
commit 3748cc9da0
8 changed files with 90 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -322,28 +322,20 @@ esp_err_t esp_eap_client_set_fast_params(esp_eap_fast_config config);
esp_err_t esp_eap_client_use_default_cert_bundle(bool use_default_bundle);
/**
* @brief Set name for certificate domain name validation
* This function sets the expected domain name for validating the certificate's subject name.
* If the provided domain name does not match the certificate's subject name, validation will fail.
*
* Enabling this option will only accept certificate with the provided subject name
* @attention 1. The `domain_name` should be a NULL-terminated string.
*
* @param[in] domain_match The expected domain name
* @param[in] len Length of the domain name (limited to 1~127 bytes).
* @param[in] domain_name The expected domain name. Pass `NULL` to clear the domain matching.
*
* @return
* - ESP_OK: The identity was set successfully.
* - ESP_ERR_INVALID_ARG: Invalid argument (len <= 0 or len >= 128).
* - ESP_OK: The domain match was set successfully.
* - ESP_ERR_INVALID_ARG: Invalid argument (length > 255).
* - ESP_ERR_NO_MEM: Memory allocation failure.
* - ESP_ERR_NOT_SUPPORTED: Feature not supported.
*/
esp_err_t esp_eap_client_set_domain_match(const char *domain_match);
/**
* @brief Clear the domain name for certificate validation
*
* This function clears the domain name that was previously set for the EAP client.
* After calling this function, the EAP client will no longer use the previously
* configured domain name during the authentication process.
*/
void esp_eap_client_clear_domain_match(void);
esp_err_t esp_eap_client_set_domain_name(const char *domain_name);
#ifdef __cplusplus
}