(Tcl) Transition from Email.FindIssuer to Cert.GetIssuer
Provides instructions for replacing deprecated FindIssuer method calls with Cert.GetIssuer. Note: This example requires Chilkat v11.0.0 or greater.
load ./chilkat.dll
set email [new_CkEmail]
set cert [new_CkCert]
# ...
# ...
# ------------------------------------------------------------------------
# The FindIssuer method is deprecated:
# certObj is a CkCert
set certObj [CkEmail_FindIssuer $email $cert]
if {[CkEmail_get_LastMethodSuccess $email] == 0} then {
puts [CkEmail_lastErrorText $email]
delete_CkEmail $email
delete_CkCert $cert
exit
}
# ...
# ...
delete_CkCert $certObj
# ------------------------------------------------------------------------
# Do the equivalent using Cert.GetIssuer.
# Your application creates a new, empty Cert object which is passed
# in the last argument and filled upon success.
set issuerCert [new_CkCert]
set success [CkCert_GetIssuer $cert $issuerCert]
if {$success == 0} then {
puts [CkEmail_lastErrorText $email]
delete_CkEmail $email
delete_CkCert $cert
delete_CkCert $issuerCert
exit
}
delete_CkEmail $email
delete_CkCert $cert
delete_CkCert $issuerCert
|