From 3c22bbbeb60bb737920f92ffe0044332c8a1b3a0 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sun, 2 Jan 2022 21:52:47 -0600 Subject: [PATCH] Update IKEv2 script - Fix IKEv2 "password is incorrect" issue when using Ubuntu 21.10 Fixes #1073. Ref: #1048. - Note: Ubuntu 21.10 is NOT a supported OS for the VPN setup scripts. Please use e.g. Ubuntu 20.04 instead. Ref: https://github.com/hwdsl2/setup-ipsec-vpn#requirements --- extras/ikev2setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index 03927a0..49ce593 100755 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -703,7 +703,7 @@ export_p12_file() { create_p12_password p12_file="$export_dir$client_name.p12" pk12util -W "$p12_password" -d sql:/etc/ipsec.d -n "$client_name" -o "$p12_file" >/dev/null || exit 1 - if [ "$os_type" = "alpine" ]; then + if [ "$os_type" = "alpine" ] || { [ "$os_type" = "ubuntu" ] && [ "$os_ver" = "11" ]; }; then pem_file="$export_dir$client_name.temp.pem" openssl pkcs12 -in "$p12_file" -out "$pem_file" -passin "pass:$p12_password" -passout "pass:$p12_password" || exit 1 openssl pkcs12 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -in "$pem_file" -out "$p12_file" \