🎈 Sync 2026-06-08 16:57:14

This commit is contained in:
github-actions[bot] committed 2026-06-08 16:57:14 +08:00
1 parent a75bbbe729
commit e41d0593c1
37 files changed
+275 -10683

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gecoosac
PKG_VERSION:=2.2.20251015
PKG_RELEASE:=5
PKG_RELEASE:=6
ifeq ($(ARCH),aarch64)
PKG_ARCH:=ac_linux_arm64
+9 -2
View File
@@ -95,6 +95,13 @@ is_ipv4() {
return 0
}
san_has_entry() {
local san="$1"
local entry="$2"
echo "$san" | tr ',' '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | grep -F -x -q "$entry"
}
cert_matches_san() {
local cert_file="$1"
local cert_host="$2"
@@ -103,8 +110,8 @@ cert_matches_san() {
[ -s "$cert_file" ] || return 1
san="$(openssl x509 -in "$cert_file" -noout -ext subjectAltName 2>/dev/null)" || return 1
echo "$san" | grep -F -q "DNS:${cert_host}" || return 1
[ -z "$cert_ip" ] || echo "$san" | grep -F -q "IP Address:${cert_ip}" || return 1
san_has_entry "$san" "DNS:${cert_host}" || return 1
[ -z "$cert_ip" ] || san_has_entry "$san" "IP Address:${cert_ip}" || return 1
return 0
}
+9 -3
View File
@@ -23,16 +23,22 @@ set_default() {
migrate_legacy_cert_paths() {
local crt_file key_file
local migrate
crt_file="$(uci -q get gecoosac.config.crt_file)"
key_file="$(uci -q get gecoosac.config.key_file)"
migrate=0
if [ "$crt_file" = "$OLD_CRT_FILE" ]; then
uci -q set "gecoosac.config.crt_file=${DEFAULT_CRT_FILE}"
changed=1
if [ -z "$key_file" ] || [ "$key_file" = "$OLD_KEY_FILE" ]; then
migrate=1
fi
elif [ -z "$crt_file" ] && [ "$key_file" = "$OLD_KEY_FILE" ]; then
migrate=1
fi
if [ "$key_file" = "$OLD_KEY_FILE" ]; then
if [ "$migrate" = "1" ]; then
uci -q set "gecoosac.config.crt_file=${DEFAULT_CRT_FILE}"
uci -q set "gecoosac.config.key_file=${DEFAULT_KEY_FILE}"
changed=1
fi