]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:40:02 03.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Sun, 3 May 2026 16:40:03 +0000 (19:40 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Sun, 3 May 2026 16:40:03 +0000 (19:40 +0300)
html/AM-GlobalFunc.rsc
html/certs/Makefile
html/certs/lists/Makefile.ipv4

index 8720105d060ae86ee54573f579de5b6495827b05..70298d023a4c906275106ac10ea7ca22888b75e0 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/437/3018529b";
+:global CommitId "main/438/526ccd61";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:35:02 03.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:40:02 03.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 138;
index 17d5603c875749905ad668b73329de98218fd870..4866b5125f72e63632a012e8fff47f49a01c17c2 100644 (file)
@@ -1,71 +1,47 @@
 # Makefile to check certificates
 
-BUILD_DIR = $(shell pwd)
-#CERTS_DIR?= ./certs
-#CERTS_DIR:= $($BUILD_DIR $(abspath $(CERTS_DIR)))
-
+BUILD_DIR := $(CURDIR)
 SHELL := /bin/bash
 
-IPV4 = true
-IPV6 = false
-IPALL = false
+IPV4_LIST := lists/Makefile.ipv4
+IPV6_LIST := lists/Makefile.ipv6
+IPALL_LIST := lists/Makefile.ipall
 
-GEN_IPV4 := $(wildcard lists/*.ipv4)
-IPV6_URLS := $(wildcard lists/Makefile.ipv6)
-IPALL_URLS := $(wildcard lists/Makefile.ipall)
 # Big CA list with all certificates ~ 2Mb
-ALL_CA_URL = https://curl.se/ca/cacert.pem
-
-# CURL = curl -sS --fail --max-time 10 --silent
-# CURL := $(CURL) -sS --fail --max-time 10 --silent
-CURL = curl --capath /dev/null --connect-timeout 5 --output /dev/null --silent
-#--verbose
+ALL_CA_URL := https://curl.se/ca/cacert.pem
+CA_LIST_DIR := ca-list
 
-#ifdef IPV4
-#CURL  := $(CURL) -4
-#endif
-#ifdef IPV6
-#CURL  := $(CURL) -6
-#endif
-#ifdef IPVALL
-#CURL  := $(CURL) -4 -6
-#endif
+CURL := curl --capath /dev/null --connect-timeout 5 --output /dev/null --silent --show-error
 
-.PHONY: default all ipv4 ca-ipv6 ca-ipall
-# ca-ipv4 ca-ipv6 ca-ipall
+.PHONY: default all ipv4 ipv6 ipall all-ca-lst check-list
 
 all: ipv4
 
 default:
-       @echo "Enable downloading the big CA list from curl.se to ca-list directory (default: true)"; \
-       
+       @echo "Available targets: ipv4, ipv6, ipall, all-ca-lst"
+       @echo "List format: host-or-ip/certificate-basename"
 
 all-ca-lst:
-       mkdir -p $@ && cd $@
-       $(CURL) $(ALL_CA_URL) --output $(notdir $<)
-
-ipv4: $(GEN_IPV4)
-
-
-%.ipv4:
-
-
-#      @mkdir -p $@ && cd $@
-#      $(CURL) -4 --cacert $(notdir $<).pem https://$(dir $<)
-
-#%.ipv4: $* $(CURL)
-#      $< -4 --cacert $(notdir $*).pem https://$(dir $*)
-
-#      @$(MAKE) $(IPV4_URLS)
-
-ipv6: $(IPV6_URLS)
-
-ipall: $(IPALL_URLS)
-
-#.PHONY: $(IPV4_URLS)
-#$(IPV4_URLS):
-#      $(CURL) -4 --cacert $(notdir $@).pem https://$(dir $@)
-
-#      $(CURL) --cacert $(notdir $<).pem https://$(dir $@)
-
-#              $(CURL) $$url --output $(notdir $$url); \
+       @mkdir -p $(CA_LIST_DIR)
+       $(CURL) $(ALL_CA_URL) --output $(CA_LIST_DIR)/cacert.pem
+
+ipv4: $(IPV4_LIST)
+       @$(MAKE) check-list LIST=$< CURL_FLAGS=-4
+
+ipv6: $(IPV6_LIST)
+       @$(MAKE) check-list LIST=$< CURL_FLAGS=-6
+
+ipall: $(IPALL_LIST)
+       @$(MAKE) check-list LIST=$< CURL_FLAGS=
+
+check-list:
+       @test -n "$(LIST)" || { echo "LIST is required" >&2; exit 2; }
+       @status=0; \
+       while IFS= read -r item || [ -n "$$item" ]; do \
+               [[ -z "$$item" || "$$item" =~ ^[[:space:]]*# ]] && continue; \
+               host="$${item%/*}"; \
+               cert="$${item##*/}"; \
+               printf 'Checking https://%s with %s.pem\n' "$$host" "$$cert"; \
+               $(CURL) $(CURL_FLAGS) --cacert "$(BUILD_DIR)/$$cert.pem" "https://$$host" || status=1; \
+       done < "$(LIST)"; \
+       exit $$status
index 09603b565518f1a0abbfe1b4f5ddf6c5c4a0c141..d2a397beccf43a89dda7854cbd2a55bd5bbf9ae1 100644 (file)
@@ -5,10 +5,6 @@ api.mullvad.net/ISRG-Root-X1
 ipv4.showipv6.de/ISRG-Root-X1
 ipv4.tunnelbroker.net/Starfield-Root-Certificate-Authority-G2
 mkcert.org/ISRG-Root-X1
-mkcert.org/DigiCert-Global-Root-G3
-mkcert.org/DigiCert-TLS-RSA4096-Root-G5
-mkcert.org/DigiCert-TLS-ECC-P384-Root-G5
-mkcert.org/DigiCert-Global-Root-G2
 ntfy.sh/ISRG-Root-X1
 www.dshield.org/GTS-Root-R4
 www.spamhaus.org/GTS-Root-R4