ESP32 over HTTPS: can't get valid certificate

Hi guys!

I have recently been using ESP32; my application will send data to a server over https; i start to see the WiFiClientSecure example that use the WiFiClientSecure library.
I have difficult to extract the root CA certificate from my server: the obtained certificate not work; moreover if I try to extract the root CA from the example server (www DOT howsmyssl DOT com), the obtained certificate is different from that of the example.

Any ideas?
Thanks in advance!