Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal')
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java12
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties1
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSH2ServerConnection.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSHSessionPool.java3
5 files changed, 12 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
index 79e565cf0..4985e742b 100644
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
+++ b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
@@ -431,7 +431,7 @@ public void connect(IProgressMonitor monitor) throws IOException, CVSAuthenticat
*/
public void disconnect() throws IOException {
if (Policy.DEBUG_SSH_PROTOCOL) {
- System.out.println("Disconnecting.");
+ System.out.println("Disconnecting."); //$NON-NLS-1$
}
if (connected) {
connected = false;
@@ -663,7 +663,7 @@ private void send_SSH_CMSG_SESSION_KEY(byte[] anti_spoofing_cookie, byte[] host_
BigInteger host_e = new BigInteger(1, host_key_public_exponent);
BigInteger host_n = new BigInteger(1, host_key_public_modulus);
if (!new KnownHosts().verifyKey(host, host_key_bits, host_e, host_n)) {
- throw new CVSAuthenticationException(Policy.bind("Client.hostIdChanged"));
+ throw new CVSAuthenticationException(Policy.bind("Client.hostIdChanged")); //$NON-NLS-1$
};
byte[] result;
if (new BigInteger(1,server_key_public_modulus).compareTo(host_n) == -1) {
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
index 1fa26e54f..2931b3b80 100644
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
+++ b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
@@ -40,13 +40,13 @@ public class KnownHosts {
static String defaultFilename() {
if (!BootLoader.getOS().equals(BootLoader.OS_LINUX)) return internalFilename();
- String HOME = System.getProperty("user.home");
+ String HOME = System.getProperty("user.home"); //$NON-NLS-1$
if (HOME==null) return internalFilename();
- return HOME+"/.ssh/known_hosts";
+ return HOME+"/.ssh/known_hosts"; //$NON-NLS-1$
}
private static String internalFilename() {
- return SSHPlugin.getPlugin().getStateLocation().append("known_hosts").toOSString();
+ return SSHPlugin.getPlugin().getStateLocation().append("known_hosts").toOSString(); //$NON-NLS-1$
}
/**
@@ -74,7 +74,7 @@ public class KnownHosts {
String line;
while ((line = r.readLine()) != null) {
if (line.length()==0) continue;
- if (line.startsWith("#")) continue;
+ if (line.startsWith("#")) continue; //$NON-NLS-1$
String[] tokens=subStrings(line);
if (tokens.length==4 && Character.isDigit(tokens[1].charAt(0)) && tokens[0].equalsIgnoreCase(hostname)) {
if (nbits.equals(new BigInteger(tokens[1])) && e.equals(new BigInteger(tokens[2])) && n.equals(new BigInteger(tokens[3]))) {
@@ -101,9 +101,9 @@ public class KnownHosts {
try {
FileWriter w = new FileWriter(defaultFilename(), true);
w.write(Character.LINE_SEPARATOR);
- w.write(hostname + " " + key_bits.toString(10) + " " + e.toString(10) + " " + n.toString(10));
+ w.write(hostname + " " + key_bits.toString(10) + " " + e.toString(10) + " " + n.toString(10)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
w.close();
- String message = Policy.bind("Client.addedHostKey", hostname);
+ String message = Policy.bind("Client.addedHostKey", hostname); //$NON-NLS-1$
IStatus status = new Status(IStatus.INFO, SSHPlugin.ID, IStatus.OK, message, null);
SSHPlugin.getPlugin().getLog().log(status);
} catch (IOException ex) {
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
index 2ee8ca46c..37babdffb 100644
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
@@ -28,3 +28,4 @@ SSHServerConnection.authenticating=Authenticating over extssh
Misc.missingMD5=The MD5 encryption algorithm is required but not available: {0}
+SSHSessionPool.AuthenticationFailed=Authentication failed
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSH2ServerConnection.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSH2ServerConnection.java
index c7c1b6f69..dfaca225b 100644
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSH2ServerConnection.java
+++ b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSH2ServerConnection.java
@@ -36,7 +36,7 @@ public class SSH2ServerConnection implements IServerConnection {
public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
ConnectionProgressMonitor innerMonitor = new ConnectionProgressMonitor(monitor);
Session session = SSHPlugin.getPlugin().getPool().getSession(location, password, innerMonitor);
- channel=(ChannelExec) session.openChannel("exec");
+ channel=(ChannelExec) session.openChannel("exec"); //$NON-NLS-1$
((ChannelExec)channel).setCommand(INVOKE_SVR_CMD);
channel.connect();
inputStream = channel.getInputStream();
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSHSessionPool.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSHSessionPool.java
index 293435a67..796570c2a 100644
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSHSessionPool.java
+++ b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh2/SSHSessionPool.java
@@ -19,6 +19,7 @@ import org
.CVSAuthenticationException;
import com.jcraft.jsch.*;
+import org.eclipse.team.internal.ccvs.ssh.Policy;
/**
* A pool of active SSH connections.
@@ -52,7 +53,7 @@ public class SSHSessionPool {
} catch (UnknownHostException ex) {
throw ex;
} catch (AuthenticationException ex) {
- throw new CVSAuthenticationException("Authentication failed");
+ throw new CVSAuthenticationException(Policy.bind("SSHSessionPool.AuthenticationFailed")); //$NON-NLS-1$
} catch (Exception ex) {
throw new IOException(ex.getMessage());
}

Back to the top