Commit Graph

13 Commits

Author SHA1 Message Date
lbernstone
d650ac6c3c WiFiClientSecure::lastError() method (#945)
* Added a lastError method to WiFiClientSecure so that a connection error from mbedTLS can be retrieved if connection fails (and then presented to a user).

* Changed to dos CRLF

* Made buffer size a const\nMore cleanup to match source
2018-01-18 01:03:56 +02:00
Jason K
cfbb7300b7 Update to make use of SSL a bit less confusing by ensuring errors are generated if the wrong method is called to retrieve the data stream. (#934) 2017-12-19 14:06:45 +01:00
copercini
14dd44ad06 Reduce net_would_block calls in handshake verification (#795)
This reduce net_would_block calls and CPU utilization
2017-11-06 15:28:37 +02:00
me-no-dev
4470e28ca1 WiFiClientSecure fail if gethostbyname returns null 2017-10-23 16:19:46 +03:00
me-no-dev
e72895b722 Quiet SSL and HTTPClient debug 2017-09-29 20:31:45 +08:00
copercini
ad179548e4 SNI support (#592)
Server Name Indication (SNI) support for WiFiClientSecure

Fix https://github.com/espressif/arduino-esp32/issues/571 and https://github.com/espressif/arduino-esp32/issues/550
2017-08-23 21:33:26 -03:00
copercini
cfde557916 Heap optimization (#471)
* Remove duplicated include

* Clear certificates just after handshake

It can save up to 7k of heap
2017-06-29 09:30:59 +02:00
copercini
51a4432ca8 HTTPClient Port (#347)
* Fix possible infinite loop in the example

* Remove workaround of sockets always return -76 

Remove workaround of sockets always return -76 (because it's fixed on IDF now)
Remove delay during handshake (improving stability)

* Remove unusable mbedtls_net of context creation

* Fix bad destructor

* Compatibility with WiFiClient for HTTPClient

* Initial port from ESP8266

Changed SHA1 fingerprint by Root CA verification
Changed log system

* Remove deprecated function
2017-05-19 10:18:20 +02:00
copercini
b46f1e2e3c Support self signed certificates (#291)
* Support self signed certificates

Fix for https://github.com/espressif/arduino-esp32/issues/265

mbedtls_ssl_conf_authmode was defined before mbedtls_ssl_config_defaults causing several bugs when no CA certificate is defined.

* Implement Arduino's log facility

Replace printf by ESP log handling

* Remove \n from debug messages

log_ doesn't need \n to break line.
2017-03-31 00:01:09 +02:00
copercini
e30447449f WiFiSecureClient fixes and improvements (#255)
* Add CA certificate in example

SHA1 fingerprint is broken now: more info: https://shattered.io

* Best error handling

When occur an error in WiFiClientSecure library just return the error message
and clean the context avoiding crash - fix for https://github.com/espressif/arduino-esp32/issues/211

Translate MbedTLS error codes in messages for best understanding

* Declarate certificates as const

mbedtls_pk_parse_key needs a const unsigned char * certificate. In old implementation the certificate was declarated as char * so first it converts to unsigned and after to const.

When we convert signed to unsigned it may result in a +1 larger output.

Fix issue https://github.com/espressif/arduino-esp32/issues/223
2017-03-10 15:52:50 +01:00
me-no-dev
bcd6dcf5f6 Fix compile error with IDF and mbedtls debug off 2017-02-28 23:18:06 +02:00
wami
95cb54cede [fix] return add --- error: no return statement in function returning non-void (#205) 2017-02-17 00:43:59 +02:00
copercini
8ab3231e31 Add WiFiClient secure lib (#184)
* Provide SSL/TLS functions to ESP32 with Arduino IDE

* Generate a new random number in case of reconnection
2017-02-11 00:20:24 +02:00