Sample code for 30+ languages & platforms
CkPython

Example: Http.GetServerCert method

Demonstrates how to call the GetServerCert method.

Chilkat CkPython Downloads

CkPython
import sys
import chilkat

success = False

http = chilkat.CkHttp()
cert = chilkat.CkCert()

success = http.GetServerCert("chilkatsoft.com",443,cert)
if (success == False):
    print(http.lastErrorText())
    sys.exit()

print(cert.subjectDN())
print(cert.validToStr())

# Output:

# CN=*.chilkatsoft.com
# Wed, 10 Jun 2026 23:59:59 GMT