Skip to content

Commit

Permalink
Check for WEP when setting authmode (#5364)
Browse files Browse the repository at this point in the history
* check if wep is enabled when setting authmode

* add requested changes
  • Loading branch information
dav1901 authored and devyte committed Nov 22, 2018
1 parent aa22c07 commit 5d57365
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
conf.threshold.authmode = AUTH_OPEN;

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

0 comments on commit 5d57365

Please sign in to comment.