feat(ssh): Add support for ECDSA SSH keys

- Resolve #319
pull/362/head
NaiJi ✨ 2023-09-26 16:18:06 -03:00
parent 0537ebcfb2
commit 172253902d
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@
"no_key_name": "Unnamed key", "no_key_name": "Unnamed key",
"root_title": "These are superuser keys", "root_title": "These are superuser keys",
"root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.", "root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.",
"input_label": "Public ED25519 or RSA key" "input_label": "Public ED25519, ECDSA or RSA key"
}, },
"onboarding": { "onboarding": {
"page1_title": "Digital independence, available to all of us", "page1_title": "Digital independence, available to all of us",

View File

@ -12,7 +12,7 @@ class SshFormCubit extends FormCubit {
required this.user, required this.user,
}) { }) {
final RegExp keyRegExp = RegExp( final RegExp keyRegExp = RegExp(
r'^(ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$', r'^(ecdsa-sha2-nistp256 AAAAE2VjZH|ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$',
); );
key = FieldCubit( key = FieldCubit(