Sample code for 30+ languages & platforms
Chilkat2-Python

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import sys
import chilkat2

success = False

cert = chilkat2.Cert()

# ------------------------------------------------------------------------
# The GetCertChain method is deprecated:

# certchainObj is a CkCertChain
certchainObj = cert.GetCertChain()
if (cert.LastMethodSuccess == False):
    print(cert.LastErrorText)
    sys.exit()

# ...
# ...

# ------------------------------------------------------------------------
# Do the equivalent using BuildCertChain.
# Your application creates a new, empty CertChain object which is passed 
# in the last argument and filled upon success.

certchainOut = chilkat2.CertChain()
success = cert.BuildCertChain(certchainOut)
if (success == False):
    print(cert.LastErrorText)
    sys.exit()