Java
Java
Transition from Email.FindIssuer to Cert.GetIssuer
Provides instructions for replacing deprecated FindIssuer method calls with Cert.GetIssuer.Chilkat Java Downloads
import com.chilkatsoft.*;
public class ChilkatExample {
static {
try {
System.loadLibrary("chilkat");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
boolean success = false;
CkEmail email = new CkEmail();
CkCert cert = new CkCert();
// ...
// ...
// ------------------------------------------------------------------------
// The FindIssuer method is deprecated:
CkCert certObj = email.FindIssuer(cert);
if (email.get_LastMethodSuccess() == false) {
System.out.println(email.lastErrorText());
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using Cert.GetIssuer.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
CkCert issuerCert = new CkCert();
success = cert.GetIssuer(issuerCert);
if (success == false) {
System.out.println(email.lastErrorText());
return;
}
}
}