Merge pull request #5983 from librick/feature_sk_ecc
luci-mod-system: allow ecdsa-sk and ed25519-sk key types
This commit is contained in:
commit
0c5d7dd8d7
1 changed files with 7 additions and 1 deletions
|
@ -22,7 +22,7 @@ var SSHPubkeyDecoder = baseclass.singleton({
|
||||||
|
|
||||||
decode: function(s)
|
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)
|
if (!parts)
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,6 +100,12 @@ var SSHPubkeyDecoder = baseclass.singleton({
|
||||||
case 'ecdsa-sha2':
|
case 'ecdsa-sha2':
|
||||||
return { type: 'ECDSA', curve: curve, comment: comment, options: options, fprint: fprint, src: s };
|
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:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue