Search in sources :

Example 6 with DViewPrivateKey

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

the class DImportKeyPairPvk method privateKeyDetailsPressed.

private void privateKeyDetailsPressed() {
    try {
        String path = new File(jtfPrivateKeyPath.getText()).getName();
        PrivateKey privateKey = loadPrivateKey();
        if (privateKey != null) {
            DViewPrivateKey dViewPrivateKey = new DViewPrivateKey(this, MessageFormat.format(res.getString("DImportKeyPairPvk.ViewPrivateKeyDetails.Title"), path), privateKey, new BouncyCastleProvider());
            dViewPrivateKey.setLocationRelativeTo(this);
            dViewPrivateKey.setVisible(true);
        }
    } catch (CryptoException ex) {
        DError.displayError(this, ex);
    }
}
Also used : PrivateKey(java.security.PrivateKey) DViewPrivateKey(org.kse.gui.dialogs.DViewPrivateKey) DViewPrivateKey(org.kse.gui.dialogs.DViewPrivateKey) CryptoException(org.kse.crypto.CryptoException) File(java.io.File) BouncyCastleProvider(org.bouncycastle.jce.provider.BouncyCastleProvider)

Aggregations

PrivateKey (java.security.PrivateKey)6 DViewPrivateKey (org.kse.gui.dialogs.DViewPrivateKey)6 File (java.io.File)3 BouncyCastleProvider (org.bouncycastle.jce.provider.BouncyCastleProvider)3 CryptoException (org.kse.crypto.CryptoException)3 Password (org.kse.crypto.Password)3 KeyStore (java.security.KeyStore)2 KeyStoreHistory (org.kse.utilities.history.KeyStoreHistory)2 KeyStoreState (org.kse.utilities.history.KeyStoreState)2 FileInputStream (java.io.FileInputStream)1 Key (java.security.Key)1 PublicKey (java.security.PublicKey)1 SecretKey (javax.crypto.SecretKey)1 DViewPublicKey (org.kse.gui.dialogs.DViewPublicKey)1 DViewSecretKey (org.kse.gui.dialogs.DViewSecretKey)1 DGetPassword (org.kse.gui.password.DGetPassword)1