mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
feat: Add domain match to wifi_enterprise example
This commit is contained in:
committed by
Kapil Gupta
parent
134b9ac589
commit
8144ed8599
@@ -99,4 +99,16 @@ menu "Example Configuration"
|
||||
default n
|
||||
help
|
||||
Use default CA certificate bundle for WiFi enterprise connection
|
||||
|
||||
config EXAMPLE_USE_SERVER_DOMAIN_MATCH
|
||||
bool "Validate server cert domain"
|
||||
help
|
||||
Validate the certificate domain
|
||||
|
||||
config EXAMPLE_SERVER_DOMAIN_MATCH_VALUE
|
||||
string "Server cert domain"
|
||||
depends on EXAMPLE_USE_SERVER_DOMAIN_MATCH
|
||||
default "espressif.com"
|
||||
help
|
||||
Accept only server certificates matching this domain
|
||||
endmenu
|
||||
|
@@ -155,6 +155,9 @@ static void initialise_wifi(void)
|
||||
#endif
|
||||
#ifdef CONFIG_EXAMPLE_USE_DEFAULT_CERT_BUNDLE
|
||||
ESP_ERROR_CHECK(esp_eap_client_use_default_cert_bundle(true));
|
||||
#endif
|
||||
#ifdef CONFIG_EXAMPLE_USE_SERVER_DOMAIN_MATCH
|
||||
ESP_ERROR_CHECK(esp_eap_client_set_domain_match(CONFIG_EXAMPLE_SERVER_DOMAIN_MATCH_VALUE));
|
||||
#endif
|
||||
ESP_ERROR_CHECK(esp_wifi_sta_enterprise_enable());
|
||||
ESP_ERROR_CHECK(esp_wifi_start());
|
||||
|
Reference in New Issue
Block a user