summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/Coordinator.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceGridGUI/Coordinator.java')
-rw-r--r--java/src/IceGridGUI/Coordinator.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/Coordinator.java
index 729d1e8a3f7..a2dbe9b38db 100644
--- a/java/src/IceGridGUI/Coordinator.java
+++ b/java/src/IceGridGUI/Coordinator.java
@@ -1262,6 +1262,11 @@ public class Coordinator
final Cursor oldCursor,
Ice.LongHolder keepAlivePeriodHolder)
{
+
+ //
+ // Keep certificates arround for connection retry
+ //
+ _trasientCert = null;
_liveDeploymentRoot.clear();
AdminSessionPrx session = null;
@@ -1418,6 +1423,20 @@ public class Coordinator
}
//
+ // Compare the server certificate with a previous accepted certificate if
+ // any, the trasient certificate is reset by Coordinator.login, and is only
+ // ussefull in case the connection is retry, because a timeout or ACM closed
+ // it while the certificate verifier was waiting for the user decission.
+ //
+ // This avoids to show the dialog again if the user already granted the cert for
+ // this login operation.
+ //
+ if(_trasientCert != null && _trasientCert.equals(cert))
+ {
+ return true;
+ }
+
+ //
// Compare the server with the user trusted server certificates.
//
try
@@ -1576,8 +1595,10 @@ public class Coordinator
TrustDecision decision = new AcceptInvalidCertDialog().show(info, validDate, validAlternateName,
trustedCA);
+
if(decision == TrustDecision.YesThisTime)
{
+ _trasientCert = (X509Certificate) info.nativeCerts[0];
return true;
}
else if(decision == TrustDecision.YesAlways)
@@ -3794,6 +3815,8 @@ public class Coordinator
private String _fileParser;
private boolean _connected;
+ private X509Certificate _trasientCert;
+
private java.util.List<GraphView> _graphViews = new java.util.ArrayList<GraphView>();
static private final int HISTORY_MAX_SIZE = 20;