diff options
Diffstat (limited to 'global-functions.rsc')
-rw-r--r-- | global-functions.rsc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/global-functions.rsc b/global-functions.rsc index d15567d..030892b 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -116,14 +116,15 @@ :global UrlEncode; :global WaitForFile; + :local UserAgent ("User-Agent: Mikrotik/" . [ /system/resource/get version ] . " Fetch"); + $LogPrintExit2 info $0 ("Downloading and importing certificate with " . \ "CommonName \"" . $CommonName . "\".") false; :do { :local LocalFileName ($CommonName . ".pem"); :local UrlFileName ([ $UrlEncode $CommonName ] . ".pem"); - /tool/fetch check-certificate=yes-without-crl \ - ($ScriptUpdatesBaseUrl . "certs/" . \ - $UrlFileName . $ScriptUpdatesUrlSuffix) \ + /tool/fetch check-certificate=yes-without-crl http-header-field=$UserAgent \ + ($ScriptUpdatesBaseUrl . "certs/" . $UrlFileName . $ScriptUpdatesUrlSuffix) \ dst-path=$LocalFileName as-value; $WaitForFile $LocalFileName; /certificate/import file-name=$LocalFileName passphrase="" as-value; |