(AutoIt) Transition from Crypt2.GetSignerCert to Crypt2.LastSignerCert
Provides instructions for replacing deprecated GetSignerCert method calls with LastSignerCert. Note: This example requires Chilkat v11.0.0 or greater.
$oCrypt2 = ObjCreate("Chilkat.Crypt2")
; ...
; ...
Local $index = 0
; ------------------------------------------------------------------------
; The GetSignerCert method is deprecated:
Local $oCertObj = $oCrypt2.GetSignerCert($index)
If ($oCrypt2.LastMethodSuccess = False) Then
ConsoleWrite($oCrypt2.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using LastSignerCert.
; Your application creates a new, empty Cert object which is passed
; in the last argument and filled upon success.
$oCertOut = ObjCreate("Chilkat.Cert")
Local $bSuccess = $oCrypt2.LastSignerCert($index,$oCertOut)
If ($bSuccess = False) Then
ConsoleWrite($oCrypt2.LastErrorText & @CRLF)
Exit
EndIf
|