-->
Page 2 of 4

Re: Three Questions About SSL support on ESP8266 module

PostPosted: Mon Dec 16, 2019 1:50 am
by esp8266_abc
A following question: If ESP8266 as SSL client is expected to switch the connections between two SSL server, then HOW? :-)

Re: Three Questions About SSL support on ESP8266 module

PostPosted: Mon Dec 16, 2019 5:02 pm
by davydnorris
You go through the same process for each one - set the CA location, set the SSL buffer size, and connect.

The only thing is that you don't have enough memory to hold them both open at the same time - for the most part this is not really a problem because you're often connecting to web sites and so you can do this one at a time.

As an example, I use Google Maps API via web calls, and I use IBMCloud as my MQTT platform. I have two CA certificate sets loaded in different areas of flash and have also found that Google needs a larger SSL buffer than IBM's MQTT, so for both I do:

Code: Select allespconn_secure_ca_enable(ESPCONN_CLIENT, ca_cert);
espconn_secure_set_size(ESPCONN_CLIENT, size);


before connecting.

Re: Three Questions About SSL support on ESP8266 module

PostPosted: Fri Dec 20, 2019 8:15 am
by eriksl
IIRC setting up only one SSL (TLS) connection already consumes huge piles of memory, amounts I will never have available. So I guess having two of them is really out of the question ;)

For my information, what amount are we really talking about in practice?

Re: Three Questions About SSL support on ESP8266 module

PostPosted: Fri Dec 20, 2019 6:59 pm
by davydnorris
The CA location and SSL buffer are not connection specific, which is why you have to operate only one connection at a time. If your connections shared the same CA then you could possibly open more than one but I think you'll be in trouble with the common SSL buffer.