(C#) 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.
Chilkat.Imap imap = new Chilkat.Imap();
// ...
// ...
// ------------------------------------------------------------------------
// The GetSslServerCert method is deprecated:
Chilkat.Cert certObj = imap.GetSslServerCert();
if (imap.LastMethodSuccess == false) {
Debug.WriteLine(imap.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using GetServerCert.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
Chilkat.Cert cert = new Chilkat.Cert();
bool success = imap.GetServerCert(cert);
if (success == false) {
Debug.WriteLine(imap.LastErrorText);
return;
}
|