diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java index 09f42c1dee9..8e1a4b441c4 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java @@ -31,6 +31,7 @@ * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception * David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short + * David McKnight (IBM) - [235756] [dstore] Unable to connect to host with SSL via REXEC *******************************************************************************/ package org.eclipse.rse.connectorservice.dstore; @@ -581,6 +582,9 @@ public class DStoreConnectorService extends StandardConnectorService implements IServerLauncher starter = getRemoteServerLauncher(); starter.setSignonInformation(info); starter.setServerLauncherProperties(serverLauncher); + if (starter instanceof RexecDstoreServer){ + ((RexecDstoreServer)starter).setSocketTimeoutValue(timeout); + } if (autoDetectSSL) timeout = 3000; else setSSLProperties(isUsingSSL()); @@ -1183,7 +1187,29 @@ public class DStoreConnectorService extends StandardConnectorService implements else { Throwable exception = connectStatus.getException(); - if (exception != null) + if (exception instanceof SSLHandshakeException) + { + List certs = connectStatus.getUntrustedCertificates(); + if (certs != null && certs.size() > 0) + { + ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider(); + if (provider != null) + { + _isConnecting = false; + provider.importCertificates(certs, getHostName()); + _isConnecting = false; + + // Don't attempt reconnect when server was started manually. The problem is that + // in that situation, the server will have terminated on the failed connection + // due to the missing certs + if (serverLauncherType != ServerLaunchType.RUNNING_LITERAL){ + internalConnect(monitor); + } + return; + } + } + } + else if (exception != null) { String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName()); msg = createSystemMessage(ICommonMessageIds.MSG_CONNECT_FAILED, IStatus.ERROR, msgTxt, exception); diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java index 85b21f223bc..97fc4df6690 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java @@ -18,6 +18,7 @@ * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [221095] [dstore][launcher] Specified REXEC port number is not used * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short + * David McKnight (IBM) - [235756] [dstore] Unable to connect to host with SSL via REXEC *******************************************************************************/ package org.eclipse.rse.internal.connectorservice.dstore; @@ -475,7 +476,7 @@ public class RexecDstoreServer implements IServerLauncher int inBytes = rxIn.available(); // any data available? - int timeout = 600; // 60 second to connect + int timeout = _socketTimeoutValue; while (inBytes == 0 && timeout > 0) {