Browse Source

Fix incorrect curve detection for ecdsa-sha2

j433866 6 years ago
parent
commit
ac1c93d29b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/operations/ParseSSHHostKey.mjs

+ 1 - 1
src/core/operations/ParseSSHHostKey.mjs

@@ -62,7 +62,7 @@ class ParseSSHHostKey extends Operation {
             output += `\ng: 0x${fields[3]}`;
             output += `\ny: 0x${fields[4]}`;
         } else if (keyType.startsWith("ecdsa-sha2")) {
-            output += `\nCurve: ${Utils.byteArrayToChars(fromHex(fields[0]))}`;
+            output += `\nCurve: ${Utils.byteArrayToChars(fromHex(fields[1]))}`;
             output += `\nPoint: 0x${fields.slice(2)}`;
         } else {
             output += "\nUnsupported key type.";