C#
C#
Example: Http.GetServerCert method
Demonstrates how to call the GetServerCert method.Chilkat C# Downloads
bool success = false;
Chilkat.Http http = new Chilkat.Http();
Chilkat.Cert cert = new Chilkat.Cert();
success = http.GetServerCert("chilkatsoft.com",443,cert);
if (success == false) {
Debug.WriteLine(http.LastErrorText);
return;
}
Debug.WriteLine(cert.SubjectDN);
Debug.WriteLine(cert.ValidToStr);
// Output:
// CN=*.chilkatsoft.com
// Wed, 10 Jun 2026 23:59:59 GMT