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

44 Commits

Author SHA1 Message Date
klucsik
b126a9c526 https fingerprint clue (#4863)
Adding a clue on the https part that yo will definitely need the fingerprint. 
(My first commit)
2018-07-03 00:40:50 -04:00
Earle F. Philhower, III
e3c970210f
Add BearSSL client and server, support true bidir, lower memory, modern SSL (#4273)
BearSSL (https://www.bearssl.org) is a TLS(SSL) library written by
Thomas Pornin that is optimized for lower-memory embedded systems
like the ESP8266. It supports a wide variety of modern ciphers and
is unique in that it doesn't perform any memory allocations during
operation (which is the unfortunate bane of the current axTLS).

BearSSL is also absolutely focused on security and by default performs
all its security checks on x.509 certificates during the connection
phase (but if you want to be insecure and dangerous, that's possible
too).

While it does support unidirectional SSL buffers, like axTLS,
as implemented the ESP8266 wrappers only support bidirectional
buffers. These bidirectional buffers avoid deadlocks in protocols
which don't have well separated receive and transmit periods.

This patch adds several classes which allow connecting to TLS servers
using this library in almost the same way as axTLS:
BearSSL::WiFiClientSecure - WiFiClient that supports TLS
BearSSL::WiFiServerSecure - WiFiServer supporting TLS and client certs

It also introduces objects for PEM/DER encoded keys and certificates:
BearSSLX509List - x.509 Certificate (list) for general use
BearSSLPrivateKey - RSA or EC private key
BearSSLPublicKey - RSA or EC public key (i.e. from a public website)

Finally, it adds a Certificate Authority store object which lets
BearSSL access a set of trusted CA certificates on SPIFFS to allow it
to verify the identity of any remote site on the Internet, without
requiring RAM except for the single matching certificate.
CertStoreSPIFFSBearSSL - Certificate store utility

Client certificates are supported for the BearSSL::WiFiClientSecure, and
what's more the BearSSL::WiFiServerSecure can also *require* remote clients
to have a trusted certificate signed by a specific CA (or yourself with
self-signing CAs).

Maximum Fragment Length Negotiation probing and usage are supported, but
be aware that most sites on the Internet don't support it yet.  When
available, you can reduce the memory footprint of the SSL client or server
dramatically (i.e. down to 2-8KB vs. the ~22KB required for a full 16K
receive fragment and 512b send fragment).  You can also manually set a
smaller fragment size and guarantee at your protocol level all data will
fit within it.

Examples are included to show the usage of these new features.

axTLS has been moved to its own namespace, "axtls".  A default "using"
clause allows existing apps to run using axTLS without any changes.

The BearSSL::WiFi{client,server}Secure implements the axTLS
client/server API which lets many end user applications take advantage
of BearSSL with few or no changes.

The BearSSL static library used presently is stored at
https://github.com/earlephilhower/bearssl-esp8266 and can be built
using the standard ESP8266 toolchain.
2018-05-14 20:46:47 -07:00
Marian Craciunescu
bd87970aae add http client configurable timeout usefull when download is slow on server side (#4705)
* add http client configurable timeout usefull when download is slow from server side

* member init outside constructor body.

* removed this.
2018-05-04 11:18:15 -03:00
Ivan Grokhotkov
61cd8d8385 examples: format all .ino files
This formats all the example source files using Arduino style rules.
2018-03-08 14:32:06 +08:00
liebman
1cd4a00cff Remove compiler warnings (#4043) 2017-12-29 13:14:56 -03:00
Joey Babcock
a71118caeb Improve error messages (#2800)
I was having trouble understanding what some of the serial output meant so I changed it to the best of my ability
2017-12-29 11:49:29 -03:00
James Stanley
2abbc36da4 Put WiFi into station mode in examples (#3731) 2017-10-22 13:53:01 +08:00
Clemens Kirchgatterer
18297458be allows global object instances be switch off with defines (#2344) 2016-08-01 11:21:50 +08:00
sk1tt1sh
9c36ff9932 Fix example for ESP8266httpUpdate (#2251)
* Fix minor typo in spelling of failed. Removed s from http paths.

* add check if we are just updating spiffs to not reboot. example now works with this change.
2016-07-18 19:33:34 +08:00
Jeroen Vogelpoel
edba2d2829 Exposed sketch MD5 through HTTP headers (#2236)
* Exposed sketch MD5 through HTTP headers

* Updated spacing, docs, example
2016-07-08 10:07:21 +08:00
Andronicus Riyono
46fccac3e5 fix bug #1940 2016-04-20 14:09:41 +08:00
Ivan Grokhotkov
a455f22587 HTTPClient, HTTPUpdate: save some RAM by moving strings into flash 2016-04-09 12:46:29 +03:00
Ivan Grokhotkov
bf7f33d918 Fix code formatting 2016-04-09 12:46:29 +03:00
Ivan Grokhotkov
bbc5e9ba01 Update library versions 2016-04-09 12:46:29 +03:00
Ivan Grokhotkov
c450023a32 ESP8266httpUpdate: decouple HTTPS overloads 2016-04-09 12:46:29 +03:00
Markus Sattler
b2a6ab8059 #1499 2016-01-25 21:05:24 +01:00
Markus Sattler
2b23b005aa allow control of enabling debug and debug level from IDE 2016-01-02 12:25:39 +01:00
Markus Sattler
ef748e369a allow downgrade to HTTP 1.0
use HTTP/1.0 for update since the update handler not support any transfer Encoding
2015-12-31 14:02:00 +01:00
Markus Sattler
5a4ced251d add check for magic header of bin before update is started.
see: #1250
2015-12-19 14:39:07 +01:00
Markus Sattler
02e6b2fc16 setMD5 has now returns bool
handle setMD5 failed in HTTP update
reset UpdaterClass when MD5 check failed
see: #1244
2015-12-18 08:30:35 +01:00
Markus Sattler
28dd31a80f add advanced error handling for HTTP update
see: #1111
2015-12-16 23:05:23 +01:00
Markus Sattler
4dd5d8cf7d allow control of restart on http update
#1202
2015-12-13 23:04:27 +01:00
Markus Sattler
fdadadc787 add default values for updateSpiffs 2015-12-10 12:03:53 +01:00
Markus Sattler
95089b75b9 fix startUpdate always false 2015-12-09 19:56:14 +01:00
Markus Sattler
b1ea7b602e httpUpdate Improve error handling 2015-12-09 16:27:04 +01:00
Markus Sattler
d8e3c766a3 ESP8266HTTPUpdate - improve error displaying 2015-12-06 11:07:25 +01:00
Markus Sattler
95d53c37c3 add httpUpdateSPIFFS.ino example 2015-12-05 20:47:58 +01:00
Markus Sattler
ecce35d240 allow SPIFFS 2015-12-05 20:33:08 +01:00
Ivan Grokhotkov
14f67c4ebc Rename ESP8266httpClient to ESP8266HTTPClient (part 1) 2015-11-30 09:48:07 +03:00
Markus Sattler
ceb8acbb94 typo 2015-11-27 14:08:16 +01:00
Markus Sattler
f115e42105 add httpUpdate.ino example
#1021
2015-11-27 13:55:21 +01:00
Markus Sattler
9f0fdd573f update ESP8266HTTPUpdate to use httpClient class
add support for MD5 check
2015-11-27 13:48:13 +01:00
Ivan Grokhotkov
a2789df2a5 ESP8266httpUpdate: add method overload to allow updates using WiFiClientSecure 2015-11-17 03:13:37 +03:00
Marvin Roger
0b89b9b467 Fix FAILD typo 2015-11-06 14:17:45 +01:00
Marvin Roger
1071e8ada1 Add libraries categories 2015-11-02 19:23:26 +01:00
Markus Sattler
966bf45b35 rename stopAllexcepted to stopAllExcept and simplify the compare 2015-08-29 15:33:41 +02:00
Markus Sattler
8e50cdb190 Updater.cpp:
- use new AutoInterruptLock
 - add delay to give the RTOS some time to handle TCP

WiFiClient.cpp
 - add stopAllexcepted to cancel all TCP excepted one

ClientContext.h
 - add getLocalPort()

ESP8266HTTPUpdate.cpp
 - close all not needed TCP and UDP

osapi.h
 - missing commit from SDK
2015-08-29 13:45:58 +02:00
Kiril Zyapkov
954499bc12 httpUpdate: fix case sensitivity issues
On Linux (presumably Mac too), the header of the library
could not be included, caps changed to match the filename.

The line 'architectures=ESP8266' in library.properties caused:
WARNING: library ESP8266httpUpdate claims to run on [ESP8266] architecture(s) and may be incompatible with your current board which runs on [esp8266] architecture(s).
2015-07-11 12:35:02 +03:00
Markus Sattler
715d4ab722 disable DEBUG_HTTP_UPDATE 2015-07-07 18:07:41 +03:00
Markus Sattler
fdb723cbad Merge remote-tracking branch 'remotes/esp8266/esp8266' into esp8266
Conflicts:
	hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp
2015-06-23 13:08:05 +02:00
Markus Sattler
750c5dcc5d code style 2015-06-22 11:51:13 +02:00
Markus Sattler
f11c65e9a7 add basic check for valid data for in updateSketch (first byte of bin is always 0xE9)
send SDK version by HTTP Update
2015-06-22 10:23:33 +02:00
Markus Sattler
3d71bec59a rename to ESP8266HTTPUpdate 2015-06-21 22:07:02 +02:00
Markus Sattler
0f513e4814 add first code for HTTP Update 2015-06-21 21:38:36 +02:00