1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-06 05:21:22 +03:00

Check for WEP when setting authmode (#5364)

* check if wep is enabled when setting authmode

* add requested changes
This commit is contained in:
dav1901 2018-11-22 22:19:37 +02:00 committed by Develo
parent aa22c07312
commit 5d573652e4

View File

@ -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