(Tcl) Transition from Cert.GetCertChain to Cert.BuildCertChain
Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain. Note: This example requires Chilkat v11.0.0 or greater.
load ./chilkat.dll
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
|