[Solved] HTTPS to sites using LetsEncrypt certificates with MKR1000

I cannot connect to my RESTful API (Django REST framework) using https on my mkr 1000.

It worked beforehand on my local network.

I updated the firmware and was able to connect to google.com, arduino.cc or amazon.com using the WifiSSLClient sketch from the Wifi101 library.

When I import my domain root certificate, there is no error message but the sketch cannot connect to my site. I tried also to connect (after importing the certificate) to the letsencrypt.org site (which probably uses also a letsencrypt certificate) and it fails also.

There is no error message at all, just if (client.connect(server, 443)) { returns false.

I had a look to this question on the forum and tried to apply the change on the ciphers handling that was proposed, with no luck.

I was able to solve this problem. In fact, on the server side, I was using nginx settings gathered from the internet. It was working with my browesr but not with the Arduino. By commenting out the following settings, my MKR1000 is able to connect to the API:

#    ssl_buffer_size               8k;
#    ssl_protocols                 TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
#    ssl_prefer_server_ciphers     on;
#    ssl_stapling                  on;
#    ssl_stapling_verify           on;
#    ssl_ecdh_curve                secp384r1:X25519:prime256v1;