[wifi] Only set default ttls phase 2 on esp-idf (#7033)

* [wifi] Only set default ttls phase 2 on esp-idf

* Add eap arduino test
This commit is contained in:
Jesse Hills 2024-07-03 14:21:41 +12:00
parent 0914dc7198
commit 5cb80619dd
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
2 changed files with 9 additions and 2 deletions

View File

@ -114,7 +114,7 @@ EAP_AUTH_SCHEMA = cv.All(
cv.Optional(CONF_USERNAME): cv.string_strict,
cv.Optional(CONF_PASSWORD): cv.string_strict,
cv.Optional(CONF_CERTIFICATE_AUTHORITY): wpa2_eap.validate_certificate,
cv.Optional(CONF_TTLS_PHASE_2): cv.All(
cv.SplitDefault(CONF_TTLS_PHASE_2, esp32_idf="mschapv2"): cv.All(
cv.enum(TTLS_PHASE_2), cv.only_with_esp_idf
),
cv.Inclusive(
@ -350,7 +350,7 @@ def eap_auth(config):
("ca_cert", ca_cert),
("client_cert", client_cert),
("client_key", key),
("ttls_phase_2", config.get(CONF_TTLS_PHASE_2, TTLS_PHASE_2["mschapv2"])),
("ttls_phase_2", config.get(CONF_TTLS_PHASE_2)),
)

View File

@ -0,0 +1,7 @@
wifi:
networks:
- ssid: MySSID
eap:
username: username
password: password
identity: identity