Programmatically access a TLS certificate chain in C++ and C#
C++
CertCheck
This is an example for how to programmatically acquire the TLS certificate for a given domain/URL, walk its chain to acquire the certificate chain, and capture important metadata, such as thumbprint.