Go
Go
Transition from Imap.GetSslServerCert to Imap.GetServerCert
Provides instructions for replacing deprecated GetSslServerCert method calls with GetServerCert.Chilkat Go Downloads
success := false
imap := chilkat.NewImap()
// ...
// ...
// ------------------------------------------------------------------------
// The GetSslServerCert method is deprecated:
certObj := imap.GetSslServerCert()
if imap.LastMethodSuccess() == false {
fmt.Println(imap.LastErrorText())
imap.DisposeImap()
return
}
// ...
// ...
certObj.DisposeCert()
// ------------------------------------------------------------------------
// Do the equivalent using GetServerCert.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
cert := chilkat.NewCert()
success = imap.GetServerCert(cert)
if success == false {
fmt.Println(imap.LastErrorText())
imap.DisposeImap()
cert.DisposeCert()
return
}
imap.DisposeImap()
cert.DisposeCert()