AutoIt
AutoIt
Transition from Crypt2.GetSignerCertChain to Crypt2.LastSignerCert
Provides instructions for replacing deprecated GetSignerCertChain method calls with LastSignerCert.Chilkat AutoIt Downloads
Local $bSuccess = False
$oCrypt2 = ObjCreate("Chilkat.Crypt2")
; ...
; ...
Local $index = 0
; ------------------------------------------------------------------------
; The GetSignerCertChain method is deprecated:
Local $oCertchainObj = $oCrypt2.GetSignerCertChain($index)
If ($oCrypt2.LastMethodSuccess = False) Then
ConsoleWrite($oCrypt2.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using LastSignerCert, and then get the certificate chain from the cert.
; Your application creates a new, empty Cert object which is passed
; in the last argument and filled upon success.
$oSignerCert = ObjCreate("Chilkat.Cert")
$bSuccess = $oCrypt2.LastSignerCert($index,$oSignerCert)
If ($bSuccess = False) Then
ConsoleWrite($oCrypt2.LastErrorText & @CRLF)
Exit
EndIf
$oCertChain = ObjCreate("Chilkat.CertChain")
$bSuccess = $oSignerCert.BuildCertChain($oCertChain)
If ($bSuccess = False) Then
ConsoleWrite($oSignerCert.LastErrorText & @CRLF)
Exit
EndIf