diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-09-30 10:08:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 10:08:10 +0200 |
commit | 0c5d7dd8d7b04ab6979fb7b6ef953a9a92e37d7a (patch) | |
tree | cfa776c5a39ef64ff3f8065ead037b4664818803 | |
parent | 84ba6a5c36072f74721d535104735757b005c8d6 (diff) | |
parent | 2b3c852aa383b0bd40041964cb74cd3823df4e45 (diff) |
Merge pull request #5983 from librick/feature_sk_ecc
luci-mod-system: allow ecdsa-sk and ed25519-sk key types
-rw-r--r-- | modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js index 8b12b2311e..df3e354e37 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js @@ -22,7 +22,7 @@ var SSHPubkeyDecoder = baseclass.singleton({ decode: function(s) { - var parts = s.trim().match(/^((?:(?:^|,)[^ =,]+(?:=(?:[^ ",]+|"(?:[^"\\]|\\.)*"))?)+ +)?(ssh-dss|ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp[0-9]+) +([^ ]+)( +.*)?$/); + var parts = s.trim().match(/^((?:(?:^|,)[^ =,]+(?:=(?:[^ ",]+|"(?:[^"\\]|\\.)*"))?)+ +)?(ssh-dss|ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp[0-9]+|sk-ecdsa-sha2-nistp256@openssh\.com|sk-ssh-ed25519@openssh\.com) +([^ ]+)( +.*)?$/); if (!parts) return null; @@ -99,6 +99,12 @@ var SSHPubkeyDecoder = baseclass.singleton({ case 'ecdsa-sha2': return { type: 'ECDSA', curve: curve, comment: comment, options: options, fprint: fprint, src: s }; + + case 'sk-ecdsa-sha2-nistp256@openssh.com': + return { type: 'ECDSA-SK', curve: 'NIST P-256', comment: comment, options: options, fprint: fprint, src: s }; + + case 'sk-ssh-ed25519@openssh.com': + return { type: 'EdDSA-SK', curve: 'Curve25519', comment: comment, options: options, fprint: fprint, src: s }; default: return null; |