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;
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;
click: isReadonlyView ? null : removeKey,
'data-key': pubkey.src
}, [
- E('strong', pubkey.comment || _('Unnamed key')), E('br'),
+ E('strong', [ pubkey.comment || _('Unnamed key') ]), E('br'),
E('small', [
'%s, %s'.format(pubkey.type, pubkey.curve || _('%d Bit').format(pubkey.bits)),
pubkey.options ? E([], [
L.showModal(_('Delete key'), [
E('div', _('Do you really want to delete the following SSH key?')),
- E('pre', delkey),
+ E('pre', [ delkey ]),
E('div', { class: 'right' }, [
E('div', { class: 'btn', click: L.hideModal }, _('Cancel')),
' ',
return E('div', {}, [
E('h2', _('SSH-Keys')),
- E('div', { 'class': 'cbi-section-descr' }, _('Public keys allow for the passwordless SSH logins with a higher security compared to the use of plain passwords. In order to upload a new key to the device, paste an OpenSSH compatible public key line or drag a <code>.pub</code> file into the input field.')),
+ E('div', { 'class': 'cbi-section-descr' }, _('Public keys allow for passwordless SSH logins with higher security than plain passwords. In order to upload a new key to the device, paste an OpenSSH-compatible public key or drag a <code>.pub</code> file into the input field.')),
E('div', { 'class': 'cbi-section-node' }, list)
]);
},