Chilkat2-Python
Chilkat2-Python
Require that the Web Server's SSL Certificate is Non-Expired and the Signature is Valid
Demonstrates setting the RequireSslCertVerify property to require that the web server's SSL/TLS certificate is non-expired and that the certificate's signature is valid.Chilkat Chilkat2-Python Downloads
import sys
import chilkat2
# This example assumes the Chilkat HTTP API to have been previously unlocked.
# See Global Unlock Sample for sample code.
url = "https://chilkatsoft.com"
http = chilkat2.Http()
http.RequireSslCertVerify = True
html = http.QuickGetStr(url)
if (http.LastMethodSuccess != True):
print(http.LastErrorText)
sys.exit()
print("Success.")