Search in sources :

Example 11 with DViewCertificate

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

the class DImportKeyPairOpenSsl method certificateDetailsPressed.

private void certificateDetailsPressed() {
    try {
        X509Certificate[] certs = loadCertificates();
        if ((certs != null) && (certs.length != 0)) {
            String path = new File(jtfCertificatePath.getText()).getName();
            DViewCertificate dViewCertificate = new DViewCertificate(this, MessageFormat.format(res.getString("DImportKeyPairOpenSsl.ViewCertificateDetails.Title"), path), certs, null, DViewCertificate.NONE);
            dViewCertificate.setLocationRelativeTo(this);
            dViewCertificate.setVisible(true);
        }
    } catch (CryptoException ex) {
        DError.displayError(this, ex);
    }
}
Also used : DViewCertificate(org.kse.gui.dialogs.DViewCertificate) CryptoException(org.kse.crypto.CryptoException) File(java.io.File) X509Certificate(java.security.cert.X509Certificate)

Example 12 with DViewCertificate

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

the class DImportKeyPairPvk method certificateDetailsPressed.

private void certificateDetailsPressed() {
    try {
        X509Certificate[] certs = loadCertificates();
        if ((certs != null) && (certs.length != 0)) {
            String path = new File(jtfCertificatePath.getText()).getName();
            DViewCertificate dViewCertificate = new DViewCertificate(this, MessageFormat.format(res.getString("DImportKeyPairPvk.ViewCertificateDetails.Title"), path), certs, null, DViewCertificate.NONE);
            dViewCertificate.setLocationRelativeTo(this);
            dViewCertificate.setVisible(true);
        }
    } catch (CryptoException ex) {
        DError.displayError(this, ex);
    }
}
Also used : DViewCertificate(org.kse.gui.dialogs.DViewCertificate) CryptoException(org.kse.crypto.CryptoException) File(java.io.File) X509Certificate(java.security.cert.X509Certificate)

Aggregations

DViewCertificate (org.kse.gui.dialogs.DViewCertificate)12 X509Certificate (java.security.cert.X509Certificate)11 KeyStoreHistory (org.kse.utilities.history.KeyStoreHistory)6 KeyStore (java.security.KeyStore)5 CryptoException (org.kse.crypto.CryptoException)5 File (java.io.File)4 ArrayList (java.util.ArrayList)3 KeyStoreState (org.kse.utilities.history.KeyStoreState)3 IOException (java.io.IOException)2 Key (java.security.Key)2 Password (org.kse.crypto.Password)2 KeyStoreType (org.kse.crypto.keystore.KeyStoreType)2 UnsupportedFlavorException (java.awt.datatransfer.UnsupportedFlavorException)1 FileNotFoundException (java.io.FileNotFoundException)1 URL (java.net.URL)1 X509CRL (java.security.cert.X509CRL)1 DExamineSsl (org.kse.gui.dialogs.DExamineSsl)1 DExaminingSsl (org.kse.gui.dialogs.DExaminingSsl)1 DGetAlias (org.kse.gui.dialogs.DGetAlias)1 DViewCrl (org.kse.gui.dialogs.DViewCrl)1