From 41b8133334e0ed56439478795e89e8dddee9d4c6 Mon Sep 17 00:00:00 2001 From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Sun, 3 May 2026 19:40:03 +0300 Subject: [PATCH] Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:40:02 03.05.2026. --- html/AM-GlobalFunc.rsc | 4 +- html/certs/Makefile | 90 +++++++++++++--------------------- html/certs/lists/Makefile.ipv4 | 4 -- 3 files changed, 35 insertions(+), 63 deletions(-) diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index 8720105d0..70298d023 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -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; diff --git a/html/certs/Makefile b/html/certs/Makefile index 17d5603c8..4866b5125 100644 --- a/html/certs/Makefile +++ b/html/certs/Makefile @@ -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 diff --git a/html/certs/lists/Makefile.ipv4 b/html/certs/lists/Makefile.ipv4 index 09603b565..d2a397bec 100644 --- a/html/certs/lists/Makefile.ipv4 +++ b/html/certs/lists/Makefile.ipv4 @@ -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 -- 2.52.0