Search in sources :

Example 1 with DExamineSsl

use of org.kse.gui.dialogs.DExamineSsl in project keystore-explorer by kaikramer.

the class ExamineSslAction method doAction.

/**
 * Do action.
 */
@Override
protected void doAction() {
    try {
        DExamineSsl dExamineSsl = new DExamineSsl(frame, kseFrame);
        dExamineSsl.setLocationRelativeTo(frame);
        dExamineSsl.setVisible(true);
        String sslHost = dExamineSsl.getSslHost();
        int sslPort = dExamineSsl.getSslPort();
        boolean useClientAuth = dExamineSsl.useClientAuth();
        KeyStoreHistory ksh = dExamineSsl.getKeyStore();
        if (dExamineSsl.wasCancelled()) {
            return;
        }
        DExaminingSsl dExaminingSsl = new DExaminingSsl(frame, sslHost, sslPort, useClientAuth, ksh);
        dExaminingSsl.setLocationRelativeTo(frame);
        dExaminingSsl.startExamination();
        dExaminingSsl.setVisible(true);
        SslConnectionInfos sslInfos = dExaminingSsl.getSSLConnectionInfos();
        if (sslInfos == null || sslInfos.getServerCertificates() == null) {
            return;
        }
        DViewCertificate dViewCertificate = new DViewCertificate(frame, MessageFormat.format(res.getString("ExamineSslAction.CertDetailsSsl.Title"), sslHost, Integer.toString(sslPort)), sslInfos.getServerCertificates(), kseFrame, DViewCertificate.IMPORT);
        dViewCertificate.setLocationRelativeTo(frame);
        dViewCertificate.setVisible(true);
    } catch (Exception ex) {
        DError.displayError(frame, ex);
    }
}
Also used : KeyStoreHistory(org.kse.utilities.history.KeyStoreHistory) DViewCertificate(org.kse.gui.dialogs.DViewCertificate) SslConnectionInfos(org.kse.utilities.ssl.SslConnectionInfos) DExaminingSsl(org.kse.gui.dialogs.DExaminingSsl) DExamineSsl(org.kse.gui.dialogs.DExamineSsl)

Aggregations

DExamineSsl (org.kse.gui.dialogs.DExamineSsl)1 DExaminingSsl (org.kse.gui.dialogs.DExaminingSsl)1 DViewCertificate (org.kse.gui.dialogs.DViewCertificate)1 KeyStoreHistory (org.kse.utilities.history.KeyStoreHistory)1 SslConnectionInfos (org.kse.utilities.ssl.SslConnectionInfos)1