Skip to content

Commit ef1a8f4

Browse files
authored
remove WPA2 Enterprise
1 parent 2c27265 commit ef1a8f4

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

libraries/WiFi/src/WiFiSTA.cpp

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -149,67 +149,6 @@ wl_status_t WiFiSTAClass::status()
149149
return (wl_status_t)xEventGroupClearBits(_sta_status_group, 0);
150150
}
151151

152-
/**
153-
* Start Wifi connection with a WPA2 Enterprise AP
154-
* if passphrase is set the most secure supported mode will be automatically selected
155-
* @param ssid const char* Pointer to the SSID string.
156-
* @param method wpa2_method_t The authentication method of WPA2 (WPA2_AUTH_TLS, WPA2_AUTH_PEAP, WPA2_AUTH_TTLS)
157-
* @param wpa2_identity const char* Pointer to the entity
158-
* @param wpa2_username const char* Pointer to the username
159-
* @param password const char * Pointer to the password.
160-
* @param ca_pem const char* Pointer to a string with the contents of a .pem file with CA cert
161-
* @param client_crt const char* Pointer to a string with the contents of a .crt file with client cert
162-
* @param client_key const char* Pointer to a string with the contants of a .key file with client key
163-
* @param bssid uint8_t[6] Optional. BSSID / MAC of AP
164-
* @param channel Optional. Channel of AP
165-
* @param connect Optional. call connect
166-
* @return
167-
*/
168-
wl_status_t WiFiSTAClass::begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity, const char* wpa2_username, const char *wpa2_password, const char* ca_pem, const char* client_crt, const char* client_key, int32_t channel, const uint8_t* bssid, bool connect)
169-
{
170-
if(!WiFi.enableSTA(true)) {
171-
log_e("STA enable failed!");
172-
return WL_CONNECT_FAILED;
173-
}
174-
175-
if(!wpa2_ssid || *wpa2_ssid == 0x00 || strlen(wpa2_ssid) > 32) {
176-
log_e("SSID too long or missing!");
177-
return WL_CONNECT_FAILED;
178-
}
179-
180-
if(wpa2_identity && strlen(wpa2_identity) > 64) {
181-
log_e("identity too long!");
182-
return WL_CONNECT_FAILED;
183-
}
184-
185-
if(wpa2_username && strlen(wpa2_username) > 64) {
186-
log_e("username too long!");
187-
return WL_CONNECT_FAILED;
188-
}
189-
190-
if(wpa2_password && strlen(wpa2_password) > 64) {
191-
log_e("password too long!");
192-
}
193-
194-
if(ca_pem) {
195-
esp_wifi_sta_wpa2_ent_set_ca_cert((uint8_t *)ca_pem, strlen(ca_pem));
196-
}
197-
198-
if(client_crt) {
199-
esp_wifi_sta_wpa2_ent_set_cert_key((uint8_t *)client_crt, strlen(client_crt), (uint8_t *)client_key, strlen(client_key), NULL, 0);
200-
}
201-
202-
esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)wpa2_identity, strlen(wpa2_identity));
203-
if(method == WPA2_AUTH_PEAP || method == WPA2_AUTH_TTLS) {
204-
esp_wifi_sta_wpa2_ent_set_username((uint8_t *)wpa2_username, strlen(wpa2_username));
205-
esp_wifi_sta_wpa2_ent_set_password((uint8_t *)wpa2_password, strlen(wpa2_password));
206-
}
207-
esp_wifi_sta_wpa2_ent_enable(); //set config settings to enable function
208-
WiFi.begin(wpa2_ssid); //connect to wifi
209-
210-
return status();
211-
}
212-
213152
/**
214153
* Start Wifi connection
215154
* if passphrase is set the most secure supported mode will be automatically selected

0 commit comments

Comments
 (0)