_props.setProperty("WebScarab.clientCertificateFile",  file); _props.setProperty("WebScarab.keystorePassword", keystorePass); _props.setProperty("WebScarab.keyPassword", keyPass);
Preferences.setPreference("WebScarab.clientCertificate", useCertCheckBox.isSelected() ? "true" : "false"); Preferences.setPreference("WebScarab.clientCertificateFile",  file); Preferences.setPreference("WebScarab.keystorePassword", keystorePass); Preferences.setPreference("WebScarab.keyPassword", keyPass);
    private void applyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_applyButtonActionPerformed        String file = keystoreTextField.getText().trim();        String keystorePass = keystorePassTextField.getText();        String keyPass = keyPassTextField.getText();        if (useCertCheckBox.isSelected() && file.equals("")) {            JOptionPane.showMessageDialog(null, new String[] {"Provide a file to read the certificate from!"}, "Error", JOptionPane.ERROR_MESSAGE);            return;        }        boolean running = _framework.isRunning();        if (running) {            if (_framework.isBusy()) {                String[] status = _framework.getStatus();                JOptionPane.showMessageDialog(this, status, "Error - plugins are busy", JOptionPane.ERROR_MESSAGE);                return;            }            _framework.stopPlugins();        }        try {            _factory.setClientCertificateFile(file, keystorePass, keyPass);        } catch (FileNotFoundException fnfe) {            JOptionPane.showMessageDialog(null, new String[] {"File not found!", fnfe.toString()}, "Error", JOptionPane.ERROR_MESSAGE);            return;        } catch (IOException ioe) {            JOptionPane.showMessageDialog(null, new String[] {"Error reading from " + file, ioe.toString()}, "Error", JOptionPane.ERROR_MESSAGE);            return;        } catch (Exception e) {            JOptionPane.showMessageDialog(null, new String[] {"Unable to load client cert from " + file, e.toString()}, "Error", JOptionPane.ERROR_MESSAGE);            return;        }        if (running) {            _framework.startPlugins();        }                _props.setProperty("WebScarab.clientCertificateFile",  file);        _props.setProperty("WebScarab.keystorePassword", keystorePass);        _props.setProperty("WebScarab.keyPassword", keyPass);                setVisible(false);        dispose();    }//GEN-LAST:event_applyButtonActionPerformed