log.entering(this.getClass().getName(), "findTrustAndUpdate",
if (Configuration.DEBUG) log.exiting(this.getClass().getName(), "findTrustAndUpdate",
  private boolean findTrustAndUpdate(LinkedList reply, boolean promptUser)      throws IOException, NoSuchAlgorithmException, CertPathValidatorException,      KeyStoreException, UnrecoverableKeyException, UnsupportedCallbackException,      CertificateEncodingException  {    log.entering(this.getClass().getName(), "findTrustAndUpdate"); //$NON-NLS-1$    CertPathValidator validator = CertPathValidator.getInstance("PKIX"); //$NON-NLS-1$    X509CertPath certPath = new X509CertPath(reply);    PKIXCertPathValidatorResult cpvr = findTrustInStore(certPath, validator);    if (cpvr == null && trustCACerts) // try cacerts.gkr - a GKR key store      {        PKIXParameters params = getCertPathParameters(GKR, gkrCaCertsPathName);        cpvr = validate(validator, certPath, params);        if (cpvr == null) // try cacerts - a JKS key store          {            params = getCertPathParameters(JKS, jksCaCertsPathName);            cpvr = validate(validator, certPath, params);          }      }    boolean result = false;    if (cpvr == null)      {        if (promptUser)          {            printVerbose((Certificate) reply.getLast());            ConfirmationCallback ccb;            ccb = new ConfirmationCallback(Messages.getString("ImportCmd.32"), //$NON-NLS-1$                                           ConfirmationCallback.INFORMATION,                                           ConfirmationCallback.YES_NO_OPTION,                                           ConfirmationCallback.NO);            getCallbackHandler().handle(new Callback[] { ccb });            int answer = ccb.getSelectedIndex();            result = answer == ConfirmationCallback.YES;          }      }    else      {        TrustAnchor anchor = cpvr.getTrustAnchor();        log.fine("Found a chain-of-trust anchored by " + anchor); //$NON-NLS-1$        Certificate trustedCert = anchor.getTrustedCert();        reply.addLast(trustedCert);        result = true;      }    log.entering(this.getClass().getName(), "findTrustAndUpdate", //$NON-NLS-1$                 Boolean.valueOf(result));    return result;  }