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

78 Commits

Author SHA1 Message Date
Ivan Grokhotkov
8f438b18db Update axTLS to e634adf (#5125) 2018-09-12 07:49:42 -07:00
Earle F. Philhower, III
00c35be985
Update to latest BearSSL library version, fixes #4898 (#4900)
* Update to latest BearSSL library version, fixes #4898

* Actually install the updated BearSSL lib/headers
2018-07-09 06:05:40 -07:00
david gauchard
7dd2ca355c
scripts for comparing core closed libs against esp-nonos-sdk ones (#4855) 2018-07-03 11:45:22 +02:00
david gauchard
74819a763b
lwip2: fix disconnection, fix reconnection (#4851) 2018-06-27 10:47:17 +02:00
david gauchard
1a9403df1b
lwip2 fix and update (#4729)
* interactive example: update with option for using DHCP again after using static IP
* lwip2: avoid crash when IP address is set to 0(any) by dhcp not getting its lease renewal in due time
* lwip2: automatically remove oldest PCBs in time-wait state, limit their number
  thanks to @me-no-dev 07f4d4c241 (diff-f8258e71e25fb9985ca3799e3d8b88ecR399)
* faq: update about tcpCleanup()
* lwip2: add a macro HAS_PHY_CAPTURE=1 indicating capture facility is available
2018-05-25 17:24:00 +02:00
Earle F. Philhower, III
5a033835e1
Add a build directory for libbearssl.a (#4736)
Simple git submodule and makefile for building the bearssl library
from source in the Arduino tree.
2018-05-23 19:50:26 -07: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
david gauchard
76a14b1f63
lwip2: fix static address management (#4677)
+ interactive example (for debugging)
2018-05-02 01:20:55 +02:00
David Gauchard
e47a92a836 lwip2: improve netif flags management on git side 2018-03-07 22:47:04 +08:00
david gauchard
3df3246514 lwip2: bump tag before 2.4.1 2018-03-07 22:47:04 +08:00
David Gauchard
2335f18f5a lwip2: fix disconnection/reconnection issue
also:
improve version string
remove useless message
2018-03-07 22:47:04 +08:00
Ivan Grokhotkov
cd6cd85fca sdk: add a script for library update
Moves instructions from Readme file into a script
2018-02-22 14:11:43 +03:00
Ivan Grokhotkov
c885542f05 sdk: update to v2.2.0-3-gf8f27ce
- Fixes WiFi not being able to reconnect after SDK update (#4398)
- Fixes increased current in light sleep mode
- Fixes return value documentation for wifi_{get,set}_country
2018-02-22 14:11:43 +03:00
Ivan Grokhotkov
429f40d321 sdk: update to 2.2.0
- update libraries and header files
- remove libmesh
- update PHY init data
2018-02-19 12:43:01 +03:00
david gauchard
0339bbb11c lwip2: use only wifi_station_get_hostname() to set netif hostname (#4299)
* lwip2: use only wifi_station_get_hostname() to set netif hostname
fix #3970

* lwip2 comments on hostname
2018-02-06 23:23:27 -03:00
David Gauchard
de2a3821f6 lower lwip2 ram and flash footprint (by disabling old asserts) 2018-01-15 09:51:33 +01:00
david gauchard
f28d2eb7d7 lwip2: fix wdt, fix wifi reconnection (#4105)
related to #4101 #4078 #4060 #4028 and maybe others
2018-01-06 19:34:11 -03:00
Ivan Grokhotkov
8edeac0cf4 sdk: rename hostname and default_hostname symbols (#1281)
hostname -> wifi_station_hostname
default_hostname -> wifi_station_default_hostname
2017-12-31 22:52:00 +08:00
david gauchard
370e75cb47 multi-mss menus for lwip2, remove lwip xcc variant, lwip2 readme, updates and fixes (#4039)
lwip2 updates:
  > multi-mss makefile
  > forwardported espconn (no multicast yet)
  > restore max 3 ntp servers for configTime() coherency
  > unchain seldom chained pbufs
  > dns cache name length back to (256->48->) 128
  > use sntp_stop/start() when dhcp address got
  > fix netif's hostname glue-handling
  > forwardported ping from lwip1.4
fix #3970
fix maybe #3963
2017-12-29 00:48:31 -03:00
david gauchard
cbfbc1ad63 lwip2 fixes and time/ntp management
core: +settimeofday()
core: +coredecls.h +sntp-lwip2.c
core: fix clock_gettime() with micros64()
core: honor DST in configTime()
core: internal clock is automatically started
examples: +esp8266/NTP-TZ-DST.ino
lwip2: sntp client removed
lwip2: fix crashing with WiFi.softAPConfig(ip,ip,ip)
fix #3852
2017-11-21 10:50:48 +08:00
david gauchard
7315095e46 lwip2: build: include and lib 2017-11-03 10:09:53 +08:00
Ivan Grokhotkov
5c01841430 sdk: update to v2.1.0-14-g33f234f
33f234f4a6
2017-10-31 02:05:40 +08:00
Ivan Grokhotkov
84512ec811 fixes for SDK update
- recompile liblwip_gcc.a with new err_t definitions
- update espconn.h (function signature change, new function)
- add option to build lwip with debug-prefix-map
2017-10-15 14:59:37 +08:00
Ivan Grokhotkov
e04903225e sdk: update to v2.1.0-10-g509eae8 2017-10-15 01:40:10 -05:00
Ivan Grokhotkov
f85f8269b7 axtls: update to 24af415
Clear bigint cache once certificates and keys are loaded, and also
during verification. Can save up to 3kB of heap in a typical use case.
2017-10-08 05:00:08 +08:00
Ivan Grokhotkov
80e9a841d6 axTLS: update to 49b9deb
- Upstream fix: Fixed issue with pathlen=0 for root certs

Fixes #2711, #3340
2017-10-02 00:26:43 +08:00
Ivan Grokhotkov
c8947953ac axtls: update to 66d530a, fixes #3335
SHA512 module stored padding in PROGMEM, but would then pass the pointer
to padding into Update function which would do a memcpy. Use the same
approach as with SHA256, that is to copy padding to the stack first, and
then pass it to Update.
2017-09-20 11:37:26 +08:00
Ivan Grokhotkov
3e9caf7a3d tools/sdk: remove conflicting time.o from libmain.a 2017-09-15 05:55:00 -05:00
Shelby Merrick
d425438839 Replace r_rand with os_random for LWIP_RAND() (#3499) 2017-08-07 15:40:11 +03:00
Ivan Grokhotkov
f05ed6e27d Update axTLS to 5de79d71.
Includes two PRs:

- https://github.com/igrr/axtls-8266/pull/46 by @earlephilhower:
  Move debug strings from RAM to Flash

- https://github.com/igrr/axtls-8266/pull/50:
  Fix memory leak in ssl_ext_host_name
2017-07-23 16:15:37 +08:00
Ivan Grokhotkov
1d41859238 axTLS: update to 1b2c299
Includes memory optimizations (less .rodata, less heap)
2017-05-09 17:40:52 +08:00
Ivan Grokhotkov
c5c138ec5a axtls: update to bddda2a0
- update ssl_client_new signature
- add max fragment length negotiation support (hardcoded to 4096 bytes)
- build axtls with -f{function,data}-sections, ~1k less DRAM usage,
  ~3k less flash
- strip prefix from build paths in debug symbols
2017-04-29 22:58:19 +08:00
Ivan Grokhotkov
ae13809c81 Update SDK to 2.0.0
- Update SDK header files and libraries to SDK 2.0.0 plus 2.0.0_16_08_09
  patch
- Remove mem_manager.o from libmain.a (replaced with umm_malloc)
- Disable switch from DIO to QIO mode for certain flash chips (saves
  IRAM space)
- Add user_rf_cal_sector_set; it points to rf_init_data sector.
- Change the way rf_init_data is spoofed.
  This is now done by wrapping spi_flash_read and returning the data we
  need during startup sequence.
- Place lwip library into flash using linker script instead of section
  attributes (saves IRAM space)
2017-02-03 04:21:20 +03:00
Ivan Grokhotkov
c2414a2252 Update axTLS to 144994c
https://github.com/igrr/axtls-8266/pull/23
2016-08-29 13:48:54 +08:00
Ivan Grokhotkov
35ee060c09 axTLS: update to d26f23a (2.0.0+) 2016-08-25 12:49:32 +08:00
Me No Dev
07f4d4c241 Lwip addons (#2260)
* Add multicast TTL to UDP and rework UdpContext

* Add limit for TCP TIME_WAIT pcbs

* Add liblwip_gcc.a

* Make the changes be backward compatible with the current xcc version
2016-07-11 21:07:45 +08:00
Ivan Grokhotkov
93d627a61d Update SDK to 1.5.4 (#2138) 2016-06-23 18:39:40 +08:00
Ivan Grokhotkov
d7d98d03ca Use libc from newlib (#1752)
* Use newlib libc library

This change adds libcmin.a, which is created from newlib libc by selectively removing some of the object files (mostly related to heap management).
The list of files is available in tools/sdk/lib/make_libcmin.sh. Files which are not needed are commented out.
This change adds support for various functions which were missing, like sscanf, strftime, etc.

* Fix some of the time functions

* Redirect stdout to serial

* Implement __putc_r

* Switch to custom newlib build

Built from https://github.com/igrr/newlib-xtensa using:
./configure --with-newlib --enable-multilib --disable-newlib-io-c99-formats --enable-newlib-supplied-syscalls --enable-target-optspace --program-transform-name="s&^&xtensa-lx106-elf-&" --disable-option-checking --with-target-subdir=xtensa-lx106-elf --target=xtensa-lx106-elf --enable-newlib-nano-formatted-io --enable-newlib-reent-small  --prefix=path-to-arduino-core/tools/sdk/libc
CROSS_CFLAGS="-DMALLOC_PROVIDED -DSIGNAL_PROVIDED -DABORT_PROVIDED" make
make install

* Update tests
2016-06-23 17:27:57 +08:00
Ivan Grokhotkov
fc80526ebf Remove symbols defined in abi.cpp from libstdc++ 2016-06-13 15:02:59 +08:00
Ivan Grokhotkov
9dd7910aed Enable SO_REUSE in LwIP and WiFiServer (#1431) (#2140) 2016-06-13 10:36:10 +08:00
Ivan Grokhotkov
0f0386e3c4 Update axTLS to ab516f7
fe6e51a...ab516f7
2016-06-13 00:56:38 +08:00
Ivan Grokhotkov
6bb8e1145b Rebuild libstdc++ with mlongcalls and link against it (#1983) 2016-06-07 22:47:35 +08:00
Ivan Grokhotkov
9e60d4d463 Update axTLS to fe6e51a (1.5.3+) 2016-06-01 17:40:04 +08:00
Ivan Grokhotkov
e8b8a606e4 Update axTLS to 139914f
- Fix occasional software WDT due to lengthy bigint operations
- Implement truly blocking reads as a workaround for half-duplex nature of axTLS
2016-05-10 23:34:33 +08:00
Ivan Grokhotkov
a2b82ed6b6 Use gcc-built LwIP by default (#1926)
It is still possible to use xcc-built LwIP by selecting "Core Development" board from tools menu.
2016-05-06 20:09:15 +08:00
Ivan Grokhotkov
f266f8a2ff Update SDK to 1.5.3 2016-05-06 19:33:48 +08:00
Ivan Grokhotkov
c8a1507504 Update axTLS to 69c757f
Fix issue with handling of large certificates (#1816)
2016-04-19 09:32:51 +03:00
Ivan Grokhotkov
8c65f2fcd0 Update axTLS to fe4518d, SNI support in WiFiClientSecure (#1285)
Fixes #1933
2016-04-19 08:29:13 +03:00
Ivan Grokhotkov
1b93072d2a Add LwIP binary built with gcc 2016-03-29 17:49:37 +03:00
Ivan Grokhotkov
aa9f47bba7 Add missing airkiss files 2016-03-29 17:48:37 +03:00