check-certificates: drop the compatibility workaround...

... and make it depend in RouterOS 7.19 and its builtin certificates.
This commit is contained in:
Christian Hesse 2026-01-12 09:22:46 +01:00
parent 9b2099e402
commit 49d3a448c6
2 changed files with 3 additions and 6 deletions

View file

@ -3,7 +3,7 @@
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md
#
# requires RouterOS, version=7.17
# requires RouterOS, version=7.19
# requires device-mode, fetch
#
# check for certificate validity
@ -117,10 +117,7 @@
:local Return "";
:for I from=0 to=5 do={
:set Return ($Return . [ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN");
:local CertSettings [ /certificate/settings/get ];
:if (([ :len ($CertSettings->"builtin-trust-anchors") ] > 0 || \
[ :len ($CertSettings->"builtin-trust-store") ] > 0) && \
[[ :parse (":return [ :len [ /certificate/builtin/find where skid=\"" . ($CertVal->"akid") . "\" ] ]") ]] > 0) do={
:if ([ :len [ /certificate/builtin/find where skid=($CertVal->"akid") ] ] > 0) do={
:return $Return;
}
:do {

View file

@ -4,7 +4,7 @@ Renew certificates and notify on expiration
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.19-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)