summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/SessionKeeper.java
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-01-24 19:37:34 +0100
committerJose <jose@zeroc.com>2013-01-24 19:37:34 +0100
commitf53a43475f52e2dcf404189331c6c614994599c4 (patch)
tree4a1d7a3784d707b41c5f4862d9156a647502337c /java/src/IceGridGUI/SessionKeeper.java
parentFix related to ICE-5010 (diff)
downloadice-f53a43475f52e2dcf404189331c6c614994599c4.tar.bz2
ice-f53a43475f52e2dcf404189331c6c614994599c4.tar.xz
ice-f53a43475f52e2dcf404189331c6c614994599c4.zip
Fixed Certificate Manager to import Certificate Entries
Diffstat (limited to 'java/src/IceGridGUI/SessionKeeper.java')
-rw-r--r--java/src/IceGridGUI/SessionKeeper.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/SessionKeeper.java b/java/src/IceGridGUI/SessionKeeper.java
index fe29f77034d..6224d3d08f5 100644
--- a/java/src/IceGridGUI/SessionKeeper.java
+++ b/java/src/IceGridGUI/SessionKeeper.java
@@ -3951,6 +3951,32 @@ public class SessionKeeper
}
_keyStore.setKeyEntry(newAlias, key, password, chain);
}
+ else if(keyStore.isCertificateEntry(alias))
+ {
+ String newAlias = alias;
+ if(newAlias == null || newAlias.length() == 0 || _keyStore.containsAlias(newAlias))
+ {
+ newAlias = JOptionPane.showInputDialog(KeyStorePanel.this,
+ "Certificate Alias For <" + alias + ">",
+ "certificate alias for <" + alias + ">:",
+ JOptionPane.INFORMATION_MESSAGE);
+ }
+
+ if(_keyStore.containsAlias(newAlias))
+ {
+ if(JOptionPane.showConfirmDialog(
+ KeyStorePanel.this,
+ "<html>Your KeyStore already contains a certificate with alias `" + newAlias + "'<br/>" +
+ "Do you want to update the certificate?</html>",
+ "Confirm Certificate Update - IceGrid Admin",
+ JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION)
+ {
+ continue;
+ }
+ }
+
+ _keyStore.setCertificateEntry(newAlias, keyStore.getCertificate(alias));
+ }
}
_keyStore.store(new FileOutputStream(_keyStorePath), new char[]{});
load(_keyStorePath);