From a47d8effb6d1aab1057297b4161921916aad4702 Mon Sep 17 00:00:00 2001 From: Miquel Bonastre Date: Wed, 16 Apr 2025 10:34:55 +0200 Subject: [PATCH] global-functions: change certificate literal with global-config param To allow installation from custom server, URL and cert need to be changed in global-config-overlay. --- global-config.rsc | 2 ++ global-functions.rsc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/global-config.rsc b/global-config.rsc index fa32b163..700aac38 100644 --- a/global-config.rsc +++ b/global-config.rsc @@ -220,11 +220,13 @@ # This is the base url to fetch scripts from. :global ScriptUpdatesBaseUrl "https://rsc.eworm.de/main/"; +:global ScriptUpdatesCertCN "ISRG Root X2"; # alternative urls - main: stable code - next: currently in development #:global ScriptUpdatesBaseUrl "https://rsc.eworm.de/next/"; #:global ScriptUpdatesBaseUrl "https://git.eworm.de/cgit/routeros-scripts/plain/"; #:global ScriptUpdatesBaseUrl "https://raw.githubusercontent.com/eworm-de/routeros-scripts/main/"; #:global ScriptUpdatesBaseUrl "https://raw.githubusercontent.com/eworm-de/routeros-scripts/next/"; +#:global ScriptUpdatesCertCN "USERTrust RSA Certification Authority"; #:global ScriptUpdatesBaseUrl "https://gitlab.com/eworm-de/routeros-scripts/raw/main/"; #:global ScriptUpdatesBaseUrl "https://gitlab.com/eworm-de/routeros-scripts/raw/next/"; :global ScriptUpdatesUrlSuffix ""; diff --git a/global-functions.rsc b/global-functions.rsc index 70269c80..1d006166 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1130,6 +1130,7 @@ :global ScriptUpdatesBaseUrl; :global ScriptUpdatesCRLF; :global ScriptUpdatesUrlSuffix; + :global ScriptUpdatesCertCN; :global CertificateAvailable; :global EitherOr; @@ -1144,7 +1145,7 @@ :global SymbolForNotification; :global ValidateSyntax; - :if ([ $CertificateAvailable "ISRG Root X2" ] = false) do={ + :if ([ $CertificateAvailable $ScriptUpdatesCertCN ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); }