HTTPS GET/POST Help

Hello all

I am trying to use the code posted here to get/post things. I am using the Nucleo-H743ZI2 and so far the example code works fine. However, when I try getting a simple .txt from my website, it fails with error code -3011. I have provided it with my sites certificate but all I get is -3011. Any suggestions? I could very well have something not setup right

You could look at this;

Its based on the Mbed example and works to send/receive data with Firebase.
GET,POST,PUT and DELETE are working for me, I’m using it now actually.

The data format has to be .json style, you can see it in the example.

My example SSL certificate in Firebase.h is working but you can simply swap it out with yours.

TLSsocket reuse can fail with error -3012 after a period of time, 8-20 minutes with Firebase, so I included a socket restart if this happens and you won’t notice it.
Not sure if its an issue with Firebase though.
If you do use socket reuse with yours could you let me know if you experience this problem?

Paul

1 Like

Thanks for the reply!

That would probably be great, if I were using this Firebase thing. What I am trying to do is for a school project, and as such what I am trying to get/post to/from is hosted by the school. I have tried getting from several sites, including httpbin, postman, and mbed, and they all work. I just don’t know why it wont connect to my website (here). The code works, but it’s like it doesn’t validate the certificate or something…

So I enabled debug output for mbed TLS and it attempts the TLS handshake with my website, but it fails with “-0x2700 (-9984): X509 - Certificate verification failed, e.g. CRL, CA or signature check failed”. Any Ideas what might be causing this? I have supplied the certificate as exported from google chrome and different websites listed above work fine too…