-1

I've tried to use my ESP8266 to connect to a website (ecocathlon.fr) with HTTPS, and it worked for some time, but recently the server has been reset and now the ESP8266 won't connect to the server. There is a new SSL certificate so I've changed the one in my code, but it doesn't change anything.

When I run this code:

http.begin("https://ecocathlon.fr/api/seeUser", "0B 11 CE FE 52 2B B6 5A E2 4D CA BC 34 0F 0B AD ED DE SF EB");

Serial.print(http.GET());

I get a "-1" error and the server returns null.

I took the certificate from Firefox and I've also generated it with OpenSSL to be sure I've got the correct one. I don't know what has changed since the server reset except the SSL certificate, so I may have the wrong one, but I don't know how to generate the correct one then.

ocrdu
  • 2,172
  • 6
  • 15
  • 22
Matk3z
  • 1
  • 1
  • On this Q&A site you are expected to [provide a MCVE](https://stackoverflow.com/help/minimal-reproducible-example), a Minimal, Complete, Verifiable Example. Those two lines of code are not enough. – Marcel Stör Dec 28 '20 at 15:15

1 Answers1

0

It looks like you made a typo. Fingerprint you used:

0B 11 CE FE 52 2B B6 5A E2 4D CA BC 34 0F 0B AD ED DE SF EB

Actual fingerprint of that site:

0B:11:CE:FE:52:2B:B6:5A:E2:4D:CA:BC:34:0F:0B:AD:ED:DE:5F:EB

Try fixing that first, and then see what happens. If it still doesn't work, let us know.

ocrdu
  • 2,172
  • 6
  • 15
  • 22