1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

2888 Commits

Author SHA1 Message Date
dav1901
56627338cc Set authmode if passphrase is provided (#5317) 2018-11-07 23:52:53 -03:00
A C SREEDHAR REDDY
4726a2501a typo fix (#5319) 2018-11-07 11:13:20 -03:00
Earle F. Philhower, III
233d3e3b5e
Move BearSSLHelpers into BearSSL namespace (#5315)
BearSSLX509List, BearSSLSession, BearSSLPublicKey, and BearSSLPrivateKey
were all in the global namespace and not in the BearSSL:: one, due to an
oversight when they were originally created.  Move them to the proper
namespace with the following mapping:
    BearSSLX509List => BearSSL::X509List
    BearSSLSession => BearSSL::Session
    BearSSLPublicKey => BearSSL::PublicKey
    BearSSLPrivateKey => BearSSL::PrivateKey
2018-11-06 19:27:40 -08:00
liebman
a42c3c399b Fix device/test_http_client tests (#5309)
* update HTTPClient API usage
skip the second POST as end() has different semantics and nulls the client pointer
use bearssl in ssl tests
add delay in python side when shutting down http web server so MacOS does not complain about address already in use

* fix crash if GET/POST was called after end() without a new begin()
update double POST test to insure no crash if POST called after end()
test now are for both AxTLS and BearSSL

* fix small comment typo
2018-11-06 22:56:10 -03:00
Earle F. Philhower, III
feb86cd4ff
Add BearSSL documentation (#5311)
Document the BearSSL::WiFiClientSecure, ::WiFiServerSecure, and the
helper classes required to use them.
2018-11-06 11:45:52 -08:00
Earle F. Philhower, III
6e0c0e3dcc Only stop waveforms actually running in ISR (#5308)
The ISR could end up writing a 0 to a GPIO that had previously been
stopped, effectively overwriting user writes to those pins.  Fix to
only actually disable and write when a pin was enabled and times out.

Fixes #5306
2018-11-05 09:41:18 -03:00
Ivan Kravets
e876170cf4 Use "PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY" as default lwIP profile for @PlatformIO (#5305) 2018-11-04 23:31:36 -03:00
Develo
8ae0746e4a
Add missing decrement operator to I2C clockCount (#5292) 2018-10-29 16:30:21 -03:00
Develo
8785143bff
Fix/update doc for dir object (#5291)
* Fix arg type in Wire to size_t

* Document dir.fileSize() and other nearby doc fixes
2018-10-29 14:53:50 -03:00
dsv19
ef95e05319 examples code cleanup (#5290)
* Update WiFiMulti.ino

* Update WiFiClientBasic.ino

* Update WiFiWebServer.ino

* Update WiFiClient.ino

* Update WiFiHTTPSServer.ino
2018-10-28 23:29:03 -03:00
Develo
22bab5f09b
Fix arg type in Wire to size_t (#5289) 2018-10-28 20:53:21 -03:00
Invent Victor
d7ca884007 support new board (invent one) (#5286)
* add inventone to boards.txt.py

* add inventone pin mapping .h file to variants

* generate files running boards.txt.py via Python2

* delete .orig files
2018-10-28 15:44:31 -03:00
Matej Sychra
cb05b86d49 I2C slave support (originally by bjoham) (#5226)
* I2C slave support; resolving conflicts against current master

* removed unused argument, updateded to hopefully pass Travis

* cleaning up commit as requested by https://github.com/esp8266/Arduino/pull/5162#pullrequestreview-162242359

* cleaning up commit as requested by https://github.com/esp8266/Arduino/pull/5162#pullrequestreview-162242359

* type fix
2018-10-26 12:04:16 -03:00
Earle F. Philhower, III
42c977bd4d
Patch axTLS CVEs and fix CA verification (#5270)
Apply patches developed by Sze Yiu Chau <schau@purdue.edu> which
correct a vulnerability in X509 parsing.

See CVE-2018-16150 and CVE-2018-16149 for more info.

CA certification validation was broken by a change put in during warning
cleanup a long time ago.  This binary now includes the 1-line correction
and HTTPSRequestCACert now works again (before was failing
because the key usages in certs were not properly read).
2018-10-24 12:47:11 -07:00
david gauchard
a063c2b36f
fix http parsing (#5262)
* follows #5252
* use const refs where relevant (aka stop being nasty with ram and cpu)
2018-10-23 22:17:54 +02:00
Jeroen88
e954022b94 Bugfix/esp8266 http client (#5250)
* Removed _client->stop() from destructor; some minor changes

* Changed BasicHttpsClient.ino to allocate BearSSL::WiFiClientSecure object on the heap in stead of stack

* Removed unnecessary code

* Correcting bad fix for #5216

* Minor formatting to pass Travis tests

* Changed client * to std::unique_ptr<> client

* Updated example
2018-10-21 10:42:55 -03:00
david gauchard
6218c40740 fix md5 comparison (#5265) 2018-10-20 23:20:25 -03:00
Adrian Scillato
561426c0c7 Fix webserver unresponsiveness (#5259) 2018-10-18 18:36:47 -03:00
david gauchard
e549355221 Fix: WiFiClient::flush() yields but can be called from events (#5254)
Fix bug introduced by #5167 which replaced delay() by yield().
That should have been esp_yield() which is the one delay()
calls and is safe from either SYS or CONT contexts.

Fixes #5237.
2018-10-17 15:32:54 -07:00
fabianoms
ad7cb635ed Improved parameter validation (#5256) 2018-10-17 17:08:38 -03:00
david gauchard
64dd492eaa fix parseArgument #2 (#5252)
* fix parseArgument

* remove recursion

* keep variable naming style consistent

* inviting Alexa

* fix alexa fix (well, trying...)

* fix pos substrings

key_end_pos--;
dont count down here, it will cut of every key by -1 ("save" will be "sav") (substring  (end = up to, but not including, so no need to -1)

Parsing cpp L329
arg.value = urlDecode(data.substring(equal_index + 1, next_index - 1));
=> -1 is too less for substring (substring  (end = up to, but not including, so no need to -1)

* alexa invite: add workaround for malformed x-www-form-urlencoded

* when !form, alway add content in key "plain"

* fix memleak

* parse arguments: use functors

* cleaning
2018-10-16 23:18:45 -03:00
Earle F. Philhower, III
d742df84e5
Make stopWaveform call interrupt callable (#5248)
* Make stopWaveform call interrupt callable

Match the behavior of pre-2.4.2 PWM by allowing stopWaveform to be
called from an interrupt.

Fixes #5247

* Move to O2, save ~500 bytes of code

The actual runtime difference of -O2 vs -O3 is quite small, but -O3
takes ~500 more bytes of code (~300 more in IRAM, ~200 more in PMEM).
2018-10-16 16:39:22 -07:00
teo1978
2eb5b5600a Update debugging.rst (#5234)
* Update debugging.rst

PLEASE REVIEW
The current link definitely points to the wrong line, where there's nothing remotely resembling a list of DEBUG_ESP_* definitions. There's not an actual "full list" in the whole boards.txt really, but this is the closest thing that can be found in that file.
Some additional explanation is needed though, unless there is an actual list somewhere else.

* Update debugging.rst

requested change
2018-10-12 21:48:53 -03:00
Jeroen88
c8497da676 ESP8266httpClient crash-on-destructor bugfix (#5220)
* Removed _client->stop() from destructor; some minor changes

* Changed BasicHttpsClient.ino to allocate BearSSL::WiFiClientSecure object on the heap in stead of stack
2018-10-11 15:34:25 -07:00
Earle F. Philhower, III
1b1b0a28a8
Add stack repainting call to ESP class (#5221)
Allow the unused stack to be reset to the check value at any time in
the application, allowing for delta-stack calculations to be done.

Add ESP.resetFreeContStack() class method for general use.

Add in some dumping in the BearSSL_Validation example to show the
usage for those that care.
2018-10-11 08:55:30 -07:00
Junxiao Shi
d17ffc2874 WiFi: improve WiFiClient(Basic) examples (#5197)
WiFiClient no longer depends on now-defunct data.sparkfun.com
service, but uses a TCP "quote of the day" service instead.

fixes #4088
2018-10-11 02:08:13 -03:00
david gauchard
a1e59e9c01 update to lwIP-2.1.0: partial SACK support by default (de-selectable in menu) (#5126)
* update to lwIP-2.1.0rc1: partial SACK support
fix #4176

* hash fix

* get some flash back due to mistake in conf (fragmentation & reassembly was incorrectly enabled)
(ahah I scared you)

* add missing include files

* update to lwip-2.1.0(release) + remove unused lwIP's include files

* lwIP release 2.1.0, SACK is now default, bigger, no-SACK is selectable

* fix ldscript

* pio

* rename 'sack' option to 'feat'ure option, + IP fragmentation/reassembly

* merge, fix pio

* change internal/hidden string

* pio: more lwip2 configuration: + without sack for no change in flash footprint
2018-10-09 16:27:27 -03:00
Evgeny Kochetkov
3c13751bcf Fix NUM_ANALOG_INPUTS for Amperka WiFi slot (#5219) 2018-10-09 08:48:45 -07:00
david gauchard
8ef21ca3ae Update to the last version of nonos-sdk V2, WiFi addons (#5210)
* fwupdate

* fw update to latest version:
WPA working, WEP+Open disabled by default. Need API change.

* helpers to follow sdk updates

* remove compare scripts - made a separate PR for them

* add wep api, restore original espressif comment (wep enabled does not prevent wpa)

* libmain was not up to date

* experimental: DTIM setting in WiFi.setSleepMode(WIFI_LIGHT/MODEM_SLEEP, DTIM-value)
with new getter: .getListenInterval() / .isSleepLevelMax()

* fixes

* fix debug message

* when not using listenInterval, set wifi sleep level to min

* update documentation

* update doc
2018-10-09 10:21:23 -03:00
david gauchard
9fb4a05d67 Fix led-pin in updater, also no need to backup LED state (#5217) 2018-10-08 07:02:27 -07:00
Adrian Scillato
464bdccf41 Fix Readme Link (#5215) 2018-10-06 16:06:18 -07:00
Earle F. Philhower, III
b21619c172 Add BearSSL license info to README.md (#5211) 2018-10-06 13:37:53 -03:00
Jeroen88
13f374666d Add WiFiClient parameter to HTTPClient (#4980)
Make HTTPClient take a WiFiClient parameter, allowing you to pass in a
simple HTTP WiFiClient or a BearSSL or axTLS WiFiClientSecure with
any desired verification options.  Deprecate the older, TLSTraits methods.
Add basic HttpsClient example.

Add optional LED feedback to the Update class
2018-10-06 07:50:03 -07:00
Konstantin Ryabinin
9bc8ea1b58 SD: Implement readBytes (#4931)
This speeds up the ESP8266WebServer::streamFile more than 3 times. Tested on streaming the 800+ Kb file from SD (FAT32), average time without a fix was 9000 ms, with the fix is 2600 ms (maximal possible SPI speed used), which is as fast as streaming the same file from internal SPIFFS. Hardware: WeMos D1 mini.
2018-10-05 13:44:55 -07:00
Kyle Fleming
9c46a81fb6 Consolidate .iram.text matcher in linker to wildcard matcher (#4356) 2018-10-04 20:09:53 -07:00
George
83a50d649d Update ESPduino pin definitions (#4828) 2018-10-04 19:08:42 -07:00
Michael Miller
656bf146bc Dns server cleanup (#5194)
Clean up the DNSServer class.

Removed member variables that are not required outside a
member call lifetime, and add destructor/checks.

Fixes #5179
2018-10-04 09:53:17 -07:00
Mick Wheeler
1de0c341b5 Support for concatenation of headers (#4864)
If the server returns several headers of the same key (e.g Set-Cookie) only the last one is returned, causing issues in communicating with some servers where cookies are required.

This change concatenates the headers of the same key separated by "," to alleviate this issue.
2018-10-04 05:50:48 -07:00
Earle F. Philhower, III
14808c9ac4
Add warning when no authenticator, drop verify() (#5205)
Print a warning when in debug mode when a BearSSL connection tries to
connect without having any defined authentication methods, since it will
fail.

Completely remove the empty axTLS compatibilty method
"::verify(char *fp, char *name)" because it can't be done w/BearSSL w/o
user code changes, and always failed.  Better to have a compile failure
when we know at compile time the app won't do what is expected.

Completes the changes started by @d-a-v in PR #4833
2018-10-03 20:27:09 -07:00
Earle F. Philhower, III
18612c97d8
Add BearSSL::setFingerprint(char* fp) (#5204)
Add a method allowing a user to send in a character string for the
fingerprint, like axTLS supported.

Implements part of PR #4833 from @d-a-v with changes requested in
discussion.
2018-10-03 19:32:47 -07:00
Develo
2f6a25b9f5
Revert "Wrong directory for installation??" (#5199)
* Revert "Make softAP documentation state the correct min value (0) for the max_connection argument. (#5165)"

This reverts commit 24a1d22730685e20c7f506574d28c90af567c439.

* Revert "Wrong directory for installation?? (#5163)"

This reverts commit d547c4766780f5a9af4a6cbda42cab790de745bc.

* Update README.md

Specify Linux dir for using git
2018-10-02 12:22:34 -03:00
aerlon
24a1d22730 Make softAP documentation state the correct min value (0) for the max_connection argument. (#5165) 2018-10-01 14:27:16 -03:00
teo1978
d547c47667 Wrong directory for installation?? (#5163)
PLEASE REVIEW, I'm not completely  sure, but on Linux there's no `hardware` directory inside `Java`, and it doesn't seem to make sense that there should be on MacOS. There is, instead, a `hardware` directory in the parent.
2018-10-01 12:36:58 -03:00
david gauchard
88d0a15f0a cleanly restore spiffs data in boards.txt (#5195) 2018-10-01 11:10:24 -03:00
daud
7643e7b05b fix doc link (#5190) 2018-10-01 02:21:46 -03:00
daud
678c7beab5 fix typo (#5189) 2018-09-30 14:28:13 -03:00
Earle F. Philhower, III
270788bedb
Really free stack after last BearSSL obj destroyed (#5185)
The BearSSL second stack, once allocated, was never deallocated.  The
reference count of the stack pointer never hit 0 due to the initial
creation counting as one.  Now, check to see if there is only one use_count
and if so then delete the stack.
2018-09-29 18:12:03 -07:00
per1234
4e3af9795b Add missing keywords.txt files to bundled libraries (#5183) 2018-09-29 10:48:23 -07:00
Earle F. Philhower, III
6314093fe5
Add SSL Session capability to speed reconnections (#5160)
SSL Sessions enable most of the SSL handshake to be skipped when both
client and server agree to use them.  Add a BearSSLSession class and
an optional setting to the SSL client to enable this.

Note that SSL sessions are unrelated to HTTP sessions.  They are
ephemeral and only relate to the SSL parameters, not anything at
the HTTP protocol level.
2018-09-28 12:03:20 -07:00
Earle F. Philhower, III
8e11836378
Move BearSSL _cipher* init to _clear() for consistency (#5178)
The cipher list count/pointer was cleared separately in the three
constructors available.  Move this reset to _clear() to reduce code
duplication and keep the semantics.
2018-09-28 09:18:07 -07:00