Skip to content

Commit 5d57365

Browse files
dav1901devyte
authored andcommitted
Check for WEP when setting authmode (#5364)
* check if wep is enabled when setting authmode * add requested changes
1 parent aa22c07 commit 5d57365

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
121121
conf.threshold.authmode = AUTH_OPEN;
122122

123123
if(passphrase) {
124-
conf.threshold.authmode = AUTH_WPA_PSK;
124+
conf.threshold.authmode = _useInsecureWEP ? AUTH_WEP : AUTH_WPA_PSK;
125125
if (strlen(passphrase) == 64) // it's not a passphrase, is the PSK, which is copied into conf.password without null term
126126
memcpy(reinterpret_cast<char*>(conf.password), passphrase, 64);
127127
else

0 commit comments

Comments
 (0)