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);
}
}
Aggregations