(VB.NET) 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.
Dim imap As New Chilkat.Imap
' ...
' ...
' ------------------------------------------------------------------------
' The GetSslServerCert method is deprecated:
Dim certObj As Chilkat.Cert = imap.GetSslServerCert()
If (imap.LastMethodSuccess = False) Then
Debug.WriteLine(imap.LastErrorText)
Exit Sub
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using GetServerCert.
' Your application creates a new, empty Cert object which is passed
' in the last argument and filled upon success.
Dim cert As New Chilkat.Cert
Dim success As Boolean = imap.GetServerCert(cert)
If (success = False) Then
Debug.WriteLine(imap.LastErrorText)
Exit Sub
End If
|