Skip to content

Commit

Permalink
Add support for ssh algorithms, compaitibale with old embeded devices
Browse files Browse the repository at this point in the history
  • Loading branch information
FANG.Ge committed Feb 7, 2024
1 parent 26d7d9f commit dda70d0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,32 @@
"bootstrap": {
"type": "string",
"description": "Content will be executed on the SSH host before the debugger call."
},
"algorithms": {
"type": "object",
"description": "This option allows you to explicitly override the default transport layer algorithms used for the connection.",
"properties": {
"cipher": {
"type": "array",
"description": "Ciphers."
},
"compress": {
"type": "array",
"description": "Compression algorithms."
},
"hmac": {
"type": "array",
"description": "(H)MAC algorithms."
},
"kex": {
"type": "array",
"description": "Key exchange algorithms."
},
"serverHostKey": {
"type": "array",
"description": "Server host key formats."
}
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/backend/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface SSHArguments {
x11host: string;
bootstrap: string;
sourceFileMap: { [index: string]: string };
algorithms: any;
}

export interface IBackend {
Expand Down
7 changes: 7 additions & 0 deletions src/backend/mi2/mi2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ export class MI2 extends EventEmitter implements IBackend {
connectionArgs.password = args.password;
}

if (args.algorithms) {
connectionArgs.algorithms = args.algorithms;
}

this.sshConn.on("ready", () => {
this.log("stdout", "Running " + this.application + " over ssh...");
const execArgs: any = {};
Expand Down Expand Up @@ -744,6 +748,9 @@ export class MI2 extends EventEmitter implements IBackend {
const result = await this.sendCommand(`stack-list-variables --thread ${thread} --frame ${frame} --simple-values`);
const variables = result.result("variables");
const ret: Variable[] = [];

this.log("stderr", "2333:" + JSON.stringify(variables));

for (const element of variables) {
const key = MINode.valueOf(element, "name");
const value = MINode.valueOf(element, "value");
Expand Down

0 comments on commit dda70d0

Please sign in to comment.