From 516b2dfabdc9bd76bdebcc2381360b0e5e049059 Mon Sep 17 00:00:00 2001 From: PorkCharsui79 Date: Wed, 11 May 2022 16:09:53 +0200 Subject: [PATCH 1/2] Added new SSH key type. Added the sk-ssh-ed25519 SSH key type. --- .../functions/accounts_ssh_authorized_keys_line_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb b/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb index 37fdc29..50ab8a3 100644 --- a/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb +++ b/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb @@ -16,7 +16,7 @@ end def accounts_ssh_authorized_keys_line_parser_string(str) - matched = str.match(%r{((sk-ecdsa-|ssh-|ecdsa-)[^\s]+)\s+([^\s]+)\s+(.*)$}) + matched = str.match(%r{((sk-ssh-ed25519-|sk-ecdsa-|ssh-|ecdsa-)[^\s]+)\s+([^\s]+)\s+(.*)$}) raise ArgumentError, 'Wrong Keyline format!' unless matched && matched.length == 5 options = str[0, str.index(matched[0])].rstrip [options, matched[1], matched[3], matched[4]] From 230d0729ca72335bc5ec7b1a000aa59a2e5cff0d Mon Sep 17 00:00:00 2001 From: PorkCharsui79 Date: Thu, 12 May 2022 10:32:43 +0200 Subject: [PATCH 2/2] Update accounts_ssh_authorized_keys_line_parser.rb I'm sorry, you are right. I fixed it. --- .../functions/accounts_ssh_authorized_keys_line_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb b/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb index 50ab8a3..5a08e2b 100644 --- a/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb +++ b/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb @@ -16,7 +16,7 @@ end def accounts_ssh_authorized_keys_line_parser_string(str) - matched = str.match(%r{((sk-ssh-ed25519-|sk-ecdsa-|ssh-|ecdsa-)[^\s]+)\s+([^\s]+)\s+(.*)$}) + matched = str.match(%r{((sk-ssh-ed25519|sk-ecdsa-|ssh-|ecdsa-)[^\s]+)\s+([^\s]+)\s+(.*)$}) raise ArgumentError, 'Wrong Keyline format!' unless matched && matched.length == 5 options = str[0, str.index(matched[0])].rstrip [options, matched[1], matched[3], matched[4]]