mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
19.14.2007 25a1091c36003f1d6b2a3afdd8a5fec5ee201ed3
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java
@@ -595,27 +595,6 @@
  }
  /**
   * Displays a dialog asking the user to accept a certificate.
   *
   * @param ce
   *          the certificate exception that occurred.
   * @return <CODE>true</CODE> if the user confirms the message, or
   * <CODE>false</CODE> if not.
   */
  private boolean askToAcceptCertificate(UserDataCertificateException ce)
  {
    boolean accept = false;
    CertificateDialog dlg = new CertificateDialog(getDialog().getFrame(), ce);
    dlg.pack();
    dlg.setVisible(true);
    if (dlg.isAccepted())
    {
      accept = true;
    }
    return accept;
  }
  /**
   * Gets the string value for a given field name.
   *
   * @param fieldName
@@ -756,12 +735,18 @@
          {
            final UserDataCertificateException ce =
              (UserDataCertificateException)ude;
            if (askToAcceptCertificate(ce))
            CertificateDialog dlg =
              new CertificateDialog(getDialog().getFrame(), ce);
            dlg.pack();
            dlg.setVisible(true);
            CertificateDialog.ReturnType answer = dlg.getUserAnswer();
            if (answer != CertificateDialog.ReturnType.NOT_ACCEPTED)
            {
              /*
               * Retry the click but now with the certificate accepted.
               */
              application.acceptCertificateForException(ce);
              application.acceptCertificateForException(ce,
                  answer == CertificateDialog.ReturnType.ACCEPTED_PERMANENTLY);
              application.nextClicked(cStep, QuickSetup.this);
              BackgroundTask worker = new NextClickedBackgroundTask(cStep);
              getDialog().workerStarted();