aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-08-18 15:26:18 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-11-09 15:18:09 +0100
commit042ff1cfda2f4832eff4fc7cf161f50aa44fa9bd (patch)
tree6935cdc70483270cccac423c1937dcc098129606
parent1265caca60bf097d66ef9ef0814e8f04f9720170 (diff)
mod/ssh-keys-import: drop the version check for ed25519 keys...routeros-7.12beta1-3
... now that we require RouterOS 7.12beta1 anyway.
-rw-r--r--mod/ssh-keys-import.rsc6
1 files changed, 2 insertions, 4 deletions
diff --git a/mod/ssh-keys-import.rsc b/mod/ssh-keys-import.rsc
index 0e82785..023407a 100644
--- a/mod/ssh-keys-import.rsc
+++ b/mod/ssh-keys-import.rsc
@@ -20,7 +20,6 @@
:global GetRandom20CharAlNum;
:global LogPrintExit2;
:global MkDir;
- :global RequiredRouterOS;
:global WaitForFile;
:if ([ :len $Key ] = 0 || [ :len $User ] = 0) do={
@@ -32,7 +31,7 @@
}
:local KeyVal [ :toarray [ $CharacterReplace $Key " " "," ] ];
- :if (!(([ $RequiredRouterOS $0 "7.12beta1" ] = true && $KeyVal->0 = "ssh-ed25519") || $KeyVal->0 = "ssh-rsa")) do={
+ :if (!($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa")) do={
$LogPrintExit2 warning $0 ("SSH key of type '" . $KeyVal->0 . "' is not supported.") true;
}
@@ -63,7 +62,6 @@
:global EitherOr;
:global LogPrintExit2;
:global ParseKeyValueStore;
- :global RequiredRouterOS;
:global SSHKeysImport;
:if ([ :len $FileName ] = 0 || [ :len $User ] = 0) do={
@@ -81,7 +79,7 @@
:local Line [ :pick $Keys 0 [ :find $Keys "\n" ] ];
:set Keys [ :pick $Keys ([ :find $Keys "\n" ] + 1) [ :len $Keys ] ];
:local KeyVal [ :toarray [ $CharacterReplace $Key " " "," ] ];
- :if (([ $RequiredRouterOS $0 "7.12beta1" ] = true && $KeyVal->0 = "ssh-ed25519") || $KeyVal->0 = "ssh-rsa") do={
+ :if ($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa") do={
$SSHKeysImport $Line $User;
:set Continue true;
}