Skip to content

Commit b05bcf4

Browse files
committed
better check for forbidden ecdsa key
1 parent 217432c commit b05bcf4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/ssh_agent_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class SSHAgentClient {
256256
key: SSHKey,
257257
seed: string,
258258
): Promise<{ cipherKey: crypto.KeyObject; ivLength: number }> {
259-
if (key.type !== 'ssh-rsa' && key.type !== 'ssh-ed25519') {
259+
if (/ecdsa/iu.test(key.type)) {
260260
throw new Error(`${key.type} key is forbidden, it always gives different signatures!`)
261261
}
262262
// Use SSH signature as decryption key

0 commit comments

Comments
 (0)