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