summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vpn/entrypoint.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/vpn/entrypoint.sh b/vpn/entrypoint.sh
index b80528a..eb09280 100644
--- a/vpn/entrypoint.sh
+++ b/vpn/entrypoint.sh
@@ -2,12 +2,15 @@
set -e
# 中間証明書チェーンを個別ファイルに分割(strongSwan は複数証明書 PEM の最初しか読まないため)
+# iOS/Android のトラストストアには ISRG Root X2 が含まれているため、
+# クロス署名版の ISRG Root X2 は送らず YE1 + Root YE の 2 枚のみ送る
n=0
file=""
while IFS= read -r line; do
case "$line" in
"-----BEGIN CERTIFICATE-----")
n=$((n+1))
+ if [ "$n" -gt 2 ]; then break; fi
file="/etc/swanctl/x509ca/chain-${n}.crt"
printf '%s\n' "$line" > "$file"
;;