1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00
Commit Graph

1467 Commits

Author SHA1 Message Date
00673e05fb Merge branch 'master' into feature/issue-2246-multi-wifi-hidden 2020-10-15 19:57:47 +02:00
0d94b5f560 Add support for hidden AP's 2020-10-15 19:56:27 +02:00
9003b02889 MDNS MultiInterface (#7636)
* MDNS MultiInterface
* Move strlcat & strlcpy to __cplusplus
* Add LwipIntfCB.cpp to Makefile
2020-10-15 10:39:55 -07:00
1c624dd76a BREAKING: Add Wrong Password wifi status case (#7652)
* Add Wrong Password wifi status case
* Add wrong password case for status return
* Add wrong password case for debug
* Add Wrong password case to interactive example
* Add case for wrong password to station doc
* Add case for wrong password to resumeFromShutdown
* Add wrong password case to wifi readme
* Update ESP8266WiFiGeneric.cpp
2020-10-15 09:52:17 -07:00
200e47fc7b Fix error when debug enabled but no port chosen (#7648)
When the debug level for the device includes SSL but the debug port is
chosen as "None," don't attempt to write debug messages.

Fixes #7638
2020-10-09 15:54:39 -07:00
bc2b13ae16 LEAmDNSv2: change a macro name to be independant from LEAmDNS1 (#7640) 2020-10-07 12:31:56 +02:00
4aeb0f5cca Use direct member initialization instead of ctr initialisation (#7558)
* Use direct member initialization instead of ctr initialisation

This removes a bit of code repetition.

* Add symbolic names for member initializers
2020-10-05 13:56:08 -07:00
85ba53a249 Remove stray axtls refs, deprecated compat funcs (#7626)
Remove the axTLS compatability functions from WiFiClient/ServerSecure,
device tests for axTLS, and any document refs to axTLS.
2020-10-02 21:39:36 -07:00
1e54cb25b0 Merge branch 'master' into redesign-wifi-multi 2020-10-02 18:14:28 +02:00
fceb390a1a Redesign ESP8266WiFiMulti.[cpp|h]
Fixed critical issues WiFiMulti library:
- WiFi scan timeout implemented to prevent endless connect loop
- Fallback implemented on WiFi connect failure to prevent endless loop
- Fast WiFi connection at startup
- Improved debug prints
- Doxygen added
- Code maturing
- Example update

Make functions not related to ESP8266WiFiMulti class static
Revert static functions startScan and printWiFiScan()
Use PolledTimeout.h to protect while loops
Move static functions beginning of the file
Add connect timeout to example
2020-10-02 17:37:32 +02:00
f542175009 httpclient: remove deprecated API (#7617) 2020-09-30 09:59:46 -07:00
37ef41ceb0 mdns: #ifndef/#define/#endif (#7615) 2020-09-30 11:03:59 +02:00
a3281fe2f3 LEA mDNS v2 (#7540)
* LEAmDNSv2
2020-09-25 11:12:39 +02:00
4a24d3cc16 FIX MIME-Type for txt-suffix (#7608)
correct mime is text/plain instead of .txt
2020-09-22 08:41:31 -07:00
3cbf3039bd FIX StaticRequestHandler crashes when cache_header is null and DEBUG_ESP_CORE is enabled (#7609) 2020-09-22 13:01:01 +02:00
32470fbfab Avoid #includes with a surrounding namespace (#7560)
untangle the namespace/double inclusions in webserver library.
This is a followup of the discussion in
https://github.com/esp8266/Arduino/pull/6946#discussion_r361582525
2020-09-17 15:35:27 +02:00
c883605bd5 EspSoftwareSerial 6.9.0: data/strings in flash alignment handling fix. Yielding during write() improvement. (#7604) 2020-09-17 11:11:39 +02:00
40eb5747e4 sntp: use one time source and fix unsynchronized sntp time stamp (#7595)
* sntp: use one time source and fix unsynchronized sntp time stamp
* show subsecond synchro between time() and gettimeofday()
2020-09-12 18:22:38 +02:00
8258db53da Fix error message typo (#7581)
Sorry, I know it's little.  But it eats at me...
2020-09-07 10:46:13 -07:00
88be34e2dc Update certs-from-mozilla.py (#7578)
* Update certs-from-mozilla.py

Check if ar exists, if not tell the user what to get to prevent issue #7300 also dynamically get certs instead of hardcoded row item https://github.com/esp8266/Arduino/pull/7573#issuecomment-686192353
changed comment for missing ar exception
updated path and check for openssl
2020-09-07 15:06:36 +02:00
bfecdb0e39 Update DigestAuthorization.ino (Simple example update) (#7579)
Simple example update to pass the method as a parameter to getDigestAuth(), so it is more easily used for POST.
Add setting the ransom seed to RANDOM_REG32 in setup() for better getCNonce() values.
2020-09-04 12:03:55 -07:00
e636a6587c Update certs-from-mozilla.py (#7573)
Looks like Mozilla changed the csv, certs are now at row 32
2020-09-02 19:53:54 -07:00
df01d19d29 Reduce codesize of setOutputPower (#7572)
The logic can be simplified by using integer logic without a functional
change. Reduces code size by 40% (78 bytes -> 46 bytes) and silences
a Warith-conversion warning.
2020-09-02 08:47:48 -07:00
ef92ab28e1 Merge branch 'master' into stdnothrow 2020-08-30 23:27:08 -04:00
be812d2a8d Netump Initial commit (#7527) 2020-08-30 13:07:52 -07:00
247d5f1218 Merge branch 'master' into stdnothrow 2020-08-30 12:39:55 -07:00
953dfd945f Avoid float-double-conversion (#7559)
Converting floats to doubles is very expensive on esp8266, so prefer
calculations or comparisons as float. This saves 10% (20 bytes) of the
String::parseFloat() code size and probably quite a bit of runtime
overhead.
2020-08-28 17:09:44 -04:00
59873908c4 Use direct member initialization instead of ctr initialisation (#7556)
This removes a bit of code repetition.
2020-08-28 10:23:05 -04:00
11f7d1766e remove (std::nothrow) where nullptr case is not handled
remove legacy new management
2020-08-24 09:51:58 +02:00
a16e1e5b8a fixes 2020-08-23 19:43:32 +02:00
385bfd7635 deleted: arduino_new/arduino_new.ino 2020-08-17 18:23:44 +02:00
6925982284 replace new by new (std::nothrow), remove arduino_new 2020-08-17 18:15:45 +02:00
777323709b webserver: add define WEBSERVER_HAS_HOOK when ::addHook() is present (#7515)
This allows conditional compilation for external libraries
2020-08-11 02:15:46 +02:00
9afb084159 Clean up minor warnings from LGTM.com (#7500)
* Clean up minor warnings from LGTM.com

LGTM (Semmie) is a tool, bought by GitHub last year, that conducts basic
linting tasks on code and HTML.

Clean up the warnings identified in the latest report:
https://lgtm.com/projects/g/esp8266/Arduino/?mode=list

No functionality should change, however this may fix some issues with
the perl utilities not exiting properly on a Ctrl-C from the command
line.

* Back out HTML changes and rerun boards.txt.py
2020-08-03 19:19:04 -07:00
a8e35a579c Add valgrind mocked test to CI (#7501)
Run valgrind on host mock example runs to catch more bugs in CI.  These
tests would have caught the problem in #7464 before users did.

Add a list of some randomly picked examples to run, and add an option to
run the loop exactly once in the host mock routine, so the test will
actually exit under valgrind.
2020-08-03 19:00:51 -07:00
d92e1edac8 Basic authentication with ESP8266httpUpdate (#7190)
Add ability to use basic access authentication with ESP8266httpUpdate
2020-07-30 08:55:29 -07:00
1041a9d752 webhook/http1.1: prevent from losing a new client while waiting (#7492) 2020-07-30 01:26:56 +02:00
33083861c8 webserver hook: allow to handle external http protocol (#7459)
* webhook api
* simplify webserver debug printouts, move text to flash
* Hook examples in HelloServer example
* print executable code address in example
* simplify example per @mcspr suggestion
2020-07-28 23:34:26 +02:00
63b41bcfab Use root cert, not fingerprint for api.github.com (#7490)
In the HTTPS example we were using a fingerprint which changes almost
daily as the github.com certificates are regenerated.  Replace this with
a trust anchor based on the ultimate root CA that github.com uses to
sign their certificates.  Assuming they don't change CAs, this
certificate should be good until 2030+

Fixes #7489
2020-07-28 12:11:00 -07:00
355b291614 CVE-2020-12638 workaround for WPA downgrade attack (#7486)
* CVE-2020-12638 workaround for WPA downgrade attack

When connected to an encrypted (WEP/WPA) router, a rogue packet can
cause the ESP8266 WiFi stack to drop to an unecrypted rogue network of
the same SSID.

Handle this by dropping the WiFi connection immediately and reconnecting
to the stored WPA/WEP network requested by the application, whenever the
AUTHMODE changes to OPEN from a secured mode.

https://lbsfilm.at/blog/wpa2-authenticationmode-downgrade-in-espressif-microprocessors
for more details.
2020-07-26 10:11:14 -07:00
555c9ebdf8 Update FP for tls.mbed.org (#7479) 2020-07-22 22:26:00 -07:00
f42cf7a5a4 Fix uninitted class variables from #7464 (#7478)
PR #7464 removed the reset of client authentication settings when server
authentication settings were changed, however it never did initialize
the client authentication information to nullptr in the constructor.
This can result in crashes during connections when client certs are not
applied.

Fix by resetting the client authenticaion variables on object
construction.
2020-07-22 22:10:44 -07:00
91427a1695 Keep client certs when server authentication set (#7464)
WiFiClientSecure.setInsecure() was clearing the secret key (but not the
_chain public client cert) incorrectly.  The other server authentication
modes also had the same effect.

The only way for it to work would be if the app first set the server
authentication method and then the client keys.  There's no good reason
for this.

Adjust the connection to only clear the server id methods and leave the
client ID untouched.

Fixes #7455
2020-07-17 14:02:17 -07:00
c18f7cb1e6 Made ESP8266WebServer::client() return a reference (fixes #7075) (#7080) 2020-07-17 02:13:29 +02:00
3c1bd65a76 WebServer: Allow client to send many requests on the same connection (#7414)
* WebServer: Allow client to send many requests on the same connection

* WebServer: Keep the connection alive with a client by default

* WebServer: Use the request's HTTP version and Connection header to set the default keep alive value

* Fix a typo in a comment
2020-07-16 13:53:48 -07:00
709ba7981e Change BSSL_CertStore test URL (#7370)
github.com forwards to www.github.com
So reaching out for "www.github.com" returns HTTP 304 instead of the nice HTTP 204
2020-07-16 12:07:40 -07:00
dfd5a4f12b replace old Ethernet Arduino-library with v2, submoduled (#6812) 2020-07-16 19:34:55 +02:00
e58bb60f87 webserver: do not count "plain" in argument list (#6768)
* webserver: do not count "plain" in argument list (it is still available though)
2020-07-13 12:40:27 +02:00
2d4a601c18 webserver: string optimization (#7446)
* webserver: string optimization

* fix
2020-07-10 10:11:51 -07:00
83158affa8 Pass String by const reference [3.0] (#6583)
Passing String by value means a full copy-constructor/temporary
string creation which is slightly inefficient. Avoid that
by using const references.
2020-07-10 13:27:51 +02:00