Initialize new key store before firing event.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 20 Jan 2009 20:58:18 +0000 (21:58 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 20 Jan 2009 20:58:18 +0000 (21:58 +0100)
src/net/pterodactylus/jkeytool/core/Core.java

index 7579fbf..e190015 100644 (file)
@@ -83,9 +83,16 @@ public class Core {
        public void createKeyStore(String keyStoreType) {
                try {
                        KeyStore keyStore = KeyStore.getInstance(keyStoreType);
+                       keyStore.load(null, null);
                        coreListenerSupport.fireKeyStoreCreated(keyStore);
                } catch (KeyStoreException kse1) {
                        coreListenerSupport.fireKeyStoreNotCreated(keyStoreType, kse1);
+               } catch (NoSuchAlgorithmException nsae1) {
+                       coreListenerSupport.fireKeyStoreNotCreated(keyStoreType, nsae1);
+               } catch (CertificateException ce1) {
+                       coreListenerSupport.fireKeyStoreNotCreated(keyStoreType, ce1);
+               } catch (IOException ioe1) {
+                       coreListenerSupport.fireKeyStoreNotCreated(keyStoreType, ioe1);
                }
        }