I’m trying update (using esp8266 microcontroller), update a DNS record hosted on DigitalOcean, using the API.
How do I do to get HTTPS fingerprint using Linux CLI, for use on my code?
Advertisement
Answer
If you are using ESP (arduino IDE) library WiFiClientSecure.h, you need declare the “const” variable for fingerprint, like bellow:
const char* fingerprint = "9A 8E 2F 33 95 CA 72 4F 47 26 54 52 A4 E5 00 70 F0 BD ED 85";
So anyhow, these values can be obtained running the command
$ echo | openssl s_client -connect host.example.com:443 |& openssl x509 -fingerprint -noout
Result:
SHA1 Fingerprint=9A:8E:2F:33:95:CA:72:4F:47:26:54:52:A4:E5:00:70:F0:BD:ED:85