Skip to content

Commit dda70d0

Browse files
author
FANG.Ge
committed
Add support for ssh algorithms, compaitibale with old embeded devices
1 parent 26d7d9f commit dda70d0

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,32 @@
288288
"bootstrap": {
289289
"type": "string",
290290
"description": "Content will be executed on the SSH host before the debugger call."
291+
},
292+
"algorithms": {
293+
"type": "object",
294+
"description": "This option allows you to explicitly override the default transport layer algorithms used for the connection.",
295+
"properties": {
296+
"cipher": {
297+
"type": "array",
298+
"description": "Ciphers."
299+
},
300+
"compress": {
301+
"type": "array",
302+
"description": "Compression algorithms."
303+
},
304+
"hmac": {
305+
"type": "array",
306+
"description": "(H)MAC algorithms."
307+
},
308+
"kex": {
309+
"type": "array",
310+
"description": "Key exchange algorithms."
311+
},
312+
"serverHostKey": {
313+
"type": "array",
314+
"description": "Server host key formats."
315+
}
316+
}
291317
}
292318
}
293319
}

src/backend/backend.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface SSHArguments {
4747
x11host: string;
4848
bootstrap: string;
4949
sourceFileMap: { [index: string]: string };
50+
algorithms: any;
5051
}
5152

5253
export interface IBackend {

src/backend/mi2/mi2.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ export class MI2 extends EventEmitter implements IBackend {
135135
connectionArgs.password = args.password;
136136
}
137137

138+
if (args.algorithms) {
139+
connectionArgs.algorithms = args.algorithms;
140+
}
141+
138142
this.sshConn.on("ready", () => {
139143
this.log("stdout", "Running " + this.application + " over ssh...");
140144
const execArgs: any = {};
@@ -744,6 +748,9 @@ export class MI2 extends EventEmitter implements IBackend {
744748
const result = await this.sendCommand(`stack-list-variables --thread ${thread} --frame ${frame} --simple-values`);
745749
const variables = result.result("variables");
746750
const ret: Variable[] = [];
751+
752+
this.log("stderr", "2333:" + JSON.stringify(variables));
753+
747754
for (const element of variables) {
748755
const key = MINode.valueOf(element, "name");
749756
const value = MINode.valueOf(element, "value");

0 commit comments

Comments
 (0)