With https://github.com/ARMmbed/mbed-os-example-tls-socket/pull/40, the example started failing on connection. It turns out that:
1) The call order was wrong - set_ca_cert() must go before open()
2) set_hostname() is required for this connection to work (our Greentea tests work fine without it).
The second point must be considered separately, as the TLSSocket::connect was removed with the recent changes in string-based APIs, but it seems it might have to stay to call the set_hostname...
With https://github.com/ARMmbed/mbed-os-example-tls-socket/pull/40, the example started failing on connection. It turns out that: 1) The call order was wrong -
set_ca_cert()
must go beforeopen()
2)set_hostname()
is required for this connection to work (our Greentea tests work fine without it).The second point must be considered separately, as the
TLSSocket::connect
was removed with the recent changes in string-based APIs, but it seems it might have to stay to call theset_hostname
...