/** * if any code error, exit else if any other error, show warning-error dialog, then return false * else return true */ public boolean doJob() { String strMethod = "doJob()"; // x) if pathAbsKeystore != nil, load keystore of type "JKS" java.security.KeyStore kstOpen = null; if (super._strPathAbsKst_ != null) { if (super._strProviderKst_ == null) { MySystem.s_printOutExit(this, strMethod, "nil super._strProviderKst_"); } // if // (super._strProviderKst_.toLowerCase().compareTo(KTLAbs._f_s_strSecurityProviderSun_.toLowerCase()) != 0) // MySystem.s_printOutExit(this, strMethod, "wrong value, super._strProviderKst_=" + // super._strProviderKst_); // MySystem.s_printOutWarning(this, strMethod, "should check for keystore of type JKS, // provider named SUN"); // memo: keystore should be of type "JKS", provided by "SUN" File fleOpen = UtilJsrFile.s_getFileOpen(super._frmOwner_, super._strPathAbsKst_); if (fleOpen == null) { MySystem.s_printOutError(this, strMethod, "nil fleOpen"); return false; } kstOpen = UtilKstJks.s_getKeystoreOpen( super._frmOwner_, fleOpen, (char[]) null // keystore's Password, not in use for verifying signed jarred file ); if (kstOpen == null) { MySystem.s_printOutError(this, strMethod, "nil kstOpen"); return false; } } super._setEnabledCursorWait_(true); if (!super._doJob_(kstOpen)) { super._setEnabledCursorWait_(false); MySystem.s_printOutError(this, strMethod, "failed"); return false; } super._setEnabledCursorWait_(false); // ---- return true; }
/** * if any error in code, exiting in case of trbrl: open up a warning dialog, and return false; * * <p>algo: . get fileOpen keystore . open keystore . fill in table entries . show dialog keystore * . enter new alias for trusted certificate entry candidate . create new tcr from crt file . * assign new entry to open keystore . save keystore */ public boolean doJob() { String strMethod = "doJob()"; if (!super.doJob()) { MySystem.s_printOutError(this, strMethod, "failed"); return false; } super._setEnabledCursorWait_(true); // --- // get file keystore // memo: keystore should be of type "Uber", provided by "?" File fleOpenKst = UtilJsrFile.s_getFileOpen(super._frmOwner_, super._strPathAbsKst_); if (fleOpenKst == null) { super._setEnabledCursorWait_(false); MySystem.s_printOutError(this, strMethod, "nil fleOpenKst"); return false; } // ---- // open keystore if (super._chrsPasswdKst_ == null) { super._setEnabledCursorWait_(false); MySystem.s_printOutExit(this, strMethod, "nil super._chrsPasswdKst_"); } KeyStore kstOpen = UtilKstUber.s_getKeystoreOpen(super._frmOwner_, fleOpenKst, super._chrsPasswdKst_); if (kstOpen == null) { super._setEnabledCursorWait_(false); MySystem.s_printOutError(this, strMethod, "nil kstOpen"); return false; } if (!super._doJob_(fleOpenKst, kstOpen)) { super._setEnabledCursorWait_(false); MySystem.s_printOutError(this, strMethod, "failed"); return false; } super._setEnabledCursorWait_(false); // ending return true; }
/** * if any error in code, exiting in case of trbrl: open up a warning dialog, and return false; * * <p>algo: * * <p>. add providers * * <p>. open keystoreSource . open keystoreTarget . select aliasSource pointing to valid kprSource * . get respective keySource & crtsSource * * <p>. create new KeyPair . create new certificate of type X.509 . assign new entry to open BKS * keystore . save BKS keystore */ public boolean doJob() { String strMethod = "doJob()"; File fleOpenKstSource = UtilJsrFile.s_getFileOpen(super._frmOwner_, super._strPathAbsKstSource_); if (fleOpenKstSource == null) { super._setEnabledCursorWait_(false); MySystem.s_printOutError(this, strMethod, "nil fleOpenKstSource"); return false; } File fleOpenKstTarget = UtilJsrFile.s_getFileOpen(super._frmOwner_, super._strPathAbsKst_); if (fleOpenKstTarget == null) { MySystem.s_printOutError(this, strMethod, "nil fleOpenKstTarget"); return false; } // -- // . open keystoreSource if (super._chrsPasswdKstSource_ == null) { super._setEnabledCursorWait_(false); MySystem.s_printOutExit(this, strMethod, "nil super._chrsPasswdKstSource_"); } KeyStore kstOpenSource = UtilKstUber.s_getKeystoreOpen( super._frmOwner_, fleOpenKstSource, super._chrsPasswdKstSource_); if (kstOpenSource == null) { super._setEnabledCursorWait_(false); MySystem.s_printOutError(this, strMethod, "nil kstOpenSource"); return false; } // ---- // open keystore target if (super._chrsPasswdKst_ == null) MySystem.s_printOutExit(this, strMethod, "nil super._chrsPasswdKst_"); KeyStore kstOpenTarget = UtilKstBks.s_getKeystoreOpen(super._frmOwner_, fleOpenKstTarget, super._chrsPasswdKst_); if (kstOpenTarget == null) { MySystem.s_printOutError(this, strMethod, "nil kstOpenTarget"); return false; } super._setEnabledCursorWait_(true); if (!super._doJob_(kstOpenSource, kstOpenTarget, fleOpenKstTarget)) { super._setEnabledCursorWait_(false); MySystem.s_printOutError(this, strMethod, "failed"); return false; } super._setEnabledCursorWait_(false); // ending return true; }