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

358 Commits

Author SHA1 Message Date
dd00db1b8c check ClientContext's this and _pcb once out of the ::connect() delay (#4194)
fix #4078
2018-01-18 21:20:33 -03:00
b08ff10269 Rework of arduino compatibility in WiFiSTAClass::config (#4145) 2018-01-17 15:30:24 -03:00
ca25068733 initialize io_ctx to nullptr 2018-01-12 18:39:10 +08:00
02259a412c fixed support for psk in WiFiSTA, added support for psk to WiFiMulti, minor code cleanups (#4076) 2018-01-10 23:15:24 -03:00
bd1c7ce1dc Add SSL enabled WiFiServer, Updater, WebServer
Adds SSL server mode for WiFiServerSecure, for plain SSL connections,
ESP8266WebServerSecure, for HTTPS web serving, and SecureHTTPSUpdater for
encrypted OTA updates.

Example code is provided for all new options, as well as a BASH script for
generating their own, self-signed certificates.

Both ESP8266WebServerSecure and SecureHTTPSUpdater are important for secure
password-based authentication.  HTTP Basic Authentication, the only supported
model presently, sends the username and password in *cleartext* and therefore
should *never* be used in any un-SSL encrypted channel unless you don't mind
sharing your login and password with anyone else on the internet.  Even if the
ESP8266 is not safety critical, this cleartext broadcast could expose you should
you reuse this password elsewhere on your network or the internet.
2018-01-10 11:56:32 +08:00
8765da258b Added WifiServer::begin(uint16_t port) method, listening port can be changed at runtime (#4123) 2018-01-09 22:10:43 -03:00
9cfbbc7ad3 keepalive api (default 2h,75s,9 not enabled) (#3937) 2018-01-05 00:17:37 -03:00
b0bb1e144f Fix issue with UdpContext.h comment (#4068) 2018-01-02 10:16:06 -03:00
4ab89d07fc ESP8266WiFiMulti: Add count function (#3073)
Return total number of AP added

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-12-30 13:16:47 -03:00
28803540a2 Added String hostname support to WiFiClient and WiFiClientSecure (#3349)
* Added String hostname support to WiFiClient and WiFiClientSecure

* Typo in WiFi
2017-12-29 01:58:36 -03:00
7dd50360b9 Fix bug in WiFiClientBasic.ino (#3902) 2017-12-28 09:47:10 -03:00
3838e58f62 WiFiClientSecure: don't use the broken max_fragment_length extension (#4033)
axTLS does not correctly implement max_fragment_length extension. This
causes servers which understand this extension (currently GnuTLS- and
WolfSSL-based) to reject the client hello.

Until this is fixed in axTLS, remove the call to enable this extension
from WiFiClientSecure.

Fixes https://github.com/esp8266/Arduino/issues/3932.
2017-12-28 01:45:49 -03:00
7fc23c6f7a WiFiUDP: fix crash when calling destinationIP with no packet available (#4036)
Fixes https://github.com/esp8266/Arduino/issues/3989.
2017-12-27 23:15:11 -03:00
fac64900dd Configurable WiFiClientSecure connect timeout, better default value (#4027)
* WiFiClientSecure: use _timeout setting when connecting

This timeout value can be customized via a call to setTimeout function.

Closes https://github.com/esp8266/Arduino/issues/3944.

* WiFiClientSecure: increase default connection timeout to 15 sec
2017-12-26 14:01:28 -03:00
ddda374985 WiFiClientSecure: don't trash unread decrypted data when writing (#4024)
* WiFiClientSecure: don't decrypt when testing for 'connected'

* WiFiClientSecure: don't trash unread decrypted data when writing

When application requests to write data, check if there is any unread
decrypted data left. If there is, don't write immediately, but save the
data to be written. When all decrypted data has been consumed by the
application, send out the saved outgoing data.

Fixes https://github.com/esp8266/Arduino/issues/2256.
2017-12-26 11:28:18 -03:00
d5bb4a99f6 in example properly wait for NTP to be set (#4000)
fix #3905
2017-12-21 16:27:58 -03:00
022ea5a872 consequence of ::flush() update: fix potential double free (#3990) 2017-12-18 08:56:18 -03:00
f8b577b6c3 fix WiFiClient::availableForWrite() with no connexion (#3985)
fix #3983
2017-12-18 00:47:56 -03:00
26980b39e3 fix #1002 ::Flush() wait for empty send buffer (#3967)
* fix #1002 ::Flush() wait for empty send buffer

* WiFiClient::Flush() guarantees that the data has been delivered
option 1 of https://github.com/esp8266/Arduino/pull/3967#discussion_r156901071
10ms max wait according to loaded tcp echo/reply scheme
2017-12-17 13:16:41 -03:00
7df2858285 Fix comment misnomer (#3939) 2017-12-08 15:58:46 -03:00
31abb6e5e1 [doc] update HTTPSRequest.ino (#3925)
add limitations of https connections
2017-12-08 03:38:19 -03:00
7b09ae5f69 Bug #3795 (#3858)
* fixes #3795

* adds beacon_interval and authmode to softap_config_equal
2017-11-22 19:01:22 -03:00
c40d8a990e adds WiFi.getPersistent() (#3857) 2017-11-22 18:08:28 -03:00
9dcc580aef Add compatibility check for ::config() method with arduino arg order (#3860) 2017-11-22 10:22:11 -03:00
2f09ea7117 refactor of WiFiMulti::run to reduce complexity and remove dead code (#3847) 2017-11-20 21:46:12 -03:00
78b0f44348 fixes #3795 (#3796)
don't ignore ret when handling AP enable/disable in softAPdisconnect
2017-11-17 20:28:34 -03:00
397592fce7 fixes #3793 (#3794)
wifi_softap_set_config always fails, password cannot be 0 unless authmode is open, no documentation found, trial and error.
2017-11-17 15:20:40 -03:00
2abbc36da4 Put WiFi into station mode in examples (#3731) 2017-10-22 13:53:01 +08:00
c83e17b31e WiFiUpd: fix warning 2017-10-15 14:41:50 +08:00
5116a46f09 WiFiClient,WiFiServer: update to match new err_t definition 2017-10-15 01:40:10 -05:00
e04903225e sdk: update to v2.1.0-10-g509eae8 2017-10-15 01:40:10 -05:00
2c2d6a3bad Don't remove persistent WiFi settings when doing scan (#2946) 2017-10-13 02:27:10 +08:00
526f4fbb6c WiFiClientSecure: add option to allow self-signed certificates
Mainly useful for testing WiFiClientSecure in local environments.

If allowSelfSignedCerts is called before verifyCertChain, then the
certificate chain will be verified, but the final certificate may be
self-signed.
2017-10-08 07:08:51 +08:00
84b046f98c WiFiClientSecure: add support for keys and certificates in PROGMEM 2017-10-08 05:04:04 +08:00
507a15910e WiFiClientSecure: display certificates when debugging is enabled 2017-10-02 00:27:22 +08:00
eb891cd6e4 Revert "Added support for user-supplied DHCP range, with basic sanity checks (#3562)"
This reverts commit bdf2296a7d.
2017-09-26 04:31:45 +08:00
13c1e8b293 UdpContext: check that pbuf_alloc doesn't return nullptr (#3354) 2017-09-22 03:56:27 -05:00
NdK
bdf2296a7d Added support for user-supplied DHCP range, with basic sanity checks (#3562) 2017-09-21 03:52:30 -05:00
41a8fdb4a9 Add the ESP8266WiFiMulti to KEYWORD1 to make it highlight in the ino file (#3624) 2017-09-20 22:17:09 -05:00
2d3b7b9759 WiFiClientSecure: add loadCACert function (#3610)
Added loadCACert function
2017-09-19 22:49:38 -05:00
8f04be4c5b Remove unused ax_port_*alloc() functions (#3482)
The ax_port_malloc, ax_port_calloc, ax_port_realloc, and ax_port_free
functions in WiFiClientSecure are not actually used by the AXTLS library.
It's directly using the library routines, and these function are never
used.  Remove these dead bits of code to make the axtls operation clearer.
2017-08-01 18:38:35 +03:00
8c3bb69530 WiFiClientSecure: don’t send close alert when opening new session
When WiFiClientSecure::connect was called, it would first tear down and
existing and set up new TCP session, then tear down existing TLS session
(using ssl_free), and then set up a new one. This caused TLS close-
notify alert to be sent to the new TCP session, preventing new session
from being established. This change postpones setting IO ctx to the new
TCP connection, fixing this issue.

Ref https://github.com/esp8266/Arduino/issues/3330
2017-06-05 17:30:57 +08:00
d6f1f0d5d7 WiFiClient: apply write timeout to single chunk (#3273)
WiFiClient write timeouts introduced in #3257 applied to the whole write
operation, which could take long time if data size was large. This
change makes the timeout happen per chunk. Timeout now happens if no
data has been delivered within a given interval.
2017-05-22 20:08:16 +08:00
f6d232f1ac WiFiClientSecure: match CN and SANs ignoring case
Some websites have certificates with uppercase letters in CN. This change
makes _verifyDN function accept such certificates by converting all names
to lower case before comparing them.

Resolves #2978
2017-05-21 22:00:33 -05:00
a8e8ecb687 WiFiClientSecure: add example of setCACert/verifyCertChain
Ref #1851
2017-05-21 22:00:33 -05:00
79cfad5d46 WiFiClientSecure: initialize ssl_ctx when loading certificate
Fixes #2470
2017-05-21 22:00:33 -05:00
4812cae8e2 WiFiClient: initialize _timeout properly 2017-05-20 12:20:03 +08:00
684b5f1629 WiFiClient: set default timeout to 5000ms for compatibility 2017-05-19 09:35:01 -05:00
71512653ca WiFiClient: use Stream::_timeout for write operations 2017-05-19 09:35:01 -05:00
eebcc656ed WiFiClient: add support for connect timeout 2017-05-19 09:35:01 -05:00