summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/SessionKeeper.java
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-10-25 16:41:44 +0200
committerJose <jose@zeroc.com>2012-10-25 16:41:44 +0200
commit0da9712e0ab51e2132b37e949c99b4a9f4f8eca9 (patch)
treecba6fa1eab54ce63dc86b81e54c12f616a452d40 /java/src/IceGridGUI/SessionKeeper.java
parentFixed Java metrics test failure on SLES (diff)
downloadice-0da9712e0ab51e2132b37e949c99b4a9f4f8eca9.tar.bz2
ice-0da9712e0ab51e2132b37e949c99b4a9f4f8eca9.tar.xz
ice-0da9712e0ab51e2132b37e949c99b4a9f4f8eca9.zip
Another fix for ICE-4905 - Provide a SSL X509 Certificate dialog
Diffstat (limited to 'java/src/IceGridGUI/SessionKeeper.java')
-rw-r--r--java/src/IceGridGUI/SessionKeeper.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/java/src/IceGridGUI/SessionKeeper.java b/java/src/IceGridGUI/SessionKeeper.java
index 0f8cf23a787..59405e28004 100644
--- a/java/src/IceGridGUI/SessionKeeper.java
+++ b/java/src/IceGridGUI/SessionKeeper.java
@@ -1796,6 +1796,7 @@ public class SessionKeeper
{
public void actionPerformed(ActionEvent e)
{
+ boolean secureEndpoints = false;
ConnectionInfo inf = null;
if(_storeConfiguration.isSelected())
{
@@ -1837,6 +1838,7 @@ public class SessionKeeper
return;
}
inf.setSSL(_directDefaultEndpointSSL.isSelected());
+ secureEndpoints = _directDefaultEndpointSSL.isSelected();
}
else
{
@@ -1849,7 +1851,7 @@ public class SessionKeeper
endpoint.append(_coordinator.getWizardCommunicator().identityToString(id));
endpoint.append(":");
endpoint.append(_directCustomEndpointValue.getText());
- _coordinator.getWizardCommunicator().stringToProxy(endpoint.toString());
+ secureEndpoints = hasSecureEndpoints(endpoint.toString());
}
catch(Ice.EndpointParseException ex)
{
@@ -1900,6 +1902,8 @@ public class SessionKeeper
JOptionPane.ERROR_MESSAGE);
return;
}
+ inf.setSSL(_routedDefaultEndpointSSL.isSelected());
+ secureEndpoints = _routedDefaultEndpointSSL.isSelected();
}
else
{
@@ -1912,7 +1916,7 @@ public class SessionKeeper
endpoint.append(_coordinator.getWizardCommunicator().identityToString(id));
endpoint.append(":");
endpoint.append(_routedCustomEndpointValue.getText());
- _coordinator.getWizardCommunicator().stringToProxy(endpoint.toString());
+ secureEndpoints = hasSecureEndpoints(endpoint.toString());
}
catch(Ice.EndpointParseException ex)
{
@@ -1945,6 +1949,16 @@ public class SessionKeeper
{
inf.setAuth(AuthType.X509CertificateAuthType);
}
+
+ //
+ // If there isn't secure endpoints, we must set aut type to username password
+ // and use X509 certificate to false.
+ //
+ if(!secureEndpoints)
+ {
+ inf.setAuth(AuthType.UsernamePasswordAuthType);
+ inf.setUseX509Certificate(false);
+ }
if(_storeConfiguration.isSelected())
{