Sample code for 30+ languages & platforms
Tcl Requires Chilkat v11.0.0+

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set cert [new_CkCert]

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

# certchainObj is a CkCertChain
set certchainObj [CkCert_GetCertChain $cert]
if {[CkCert_get_LastMethodSuccess $cert] == 0} then {
    puts [CkCert_lastErrorText $cert]
    delete_CkCert $cert
    exit
}

#  ...
#  ...

delete_CkCertChain $certchainObj

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

set certchainOut [new_CkCertChain]

set success [CkCert_BuildCertChain $cert $certchainOut]
if {$success == 0} then {
    puts [CkCert_lastErrorText $cert]
    delete_CkCert $cert
    delete_CkCertChain $certchainOut
    exit
}


delete_CkCert $cert
delete_CkCertChain $certchainOut