From patchwork Thu May 28 17:58:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 3151 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49XwSf31qJz43rk for ; Thu, 28 May 2020 17:59:30 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49XwSK1x2lz32M; Thu, 28 May 2020 17:59:13 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49XwSJ6blXz2ysJ; Thu, 28 May 2020 17:59:12 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49XwSB3DWXz2yjB for ; Thu, 28 May 2020 17:59:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49XwSB2f4Hz1dJ; Thu, 28 May 2020 17:59:06 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1590688746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WTlYgerdFzyr5+91BF6Z4BgCd3pAQjdiSI1gFlq3lY4=; b=7s5mrBZWNIq6kwTl7fkT/oxGHR4HdGXGtRV6Pr4gBxXmfnOQnjZZ3CwUdY31UngCL7PBQm OmAGISwNIc5uuqCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1590688746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WTlYgerdFzyr5+91BF6Z4BgCd3pAQjdiSI1gFlq3lY4=; b=tzmqgBgvHKj4/EnogOtqnPFh8Njk5pJk/TiD+/UJLGqSCJopYdTRcWl5LZanJ1diMnXHfk gmbRhJAGKcBiekDzgZt/NczQ5ggpiPUcpP2EcNXSn34QvWT7XiTUE9bw/Q2n3VSRWP2pVB apiNa0BflPnkt0na9ER5o6JVhFC7BWKeq79LZgAGukl0a71BhF8TpXKgA9esqK759myK67 8rv44ocjKORvKeDTW4i8nYv/RxaPzqdL6oc6FHWrkta9wyO9h4fg66wHEQG2LKtdtA29r9 kaoX6pLTGVFHzGv9eaAjsLqlI+DBUP7gZBcf2b3gTma9ZXukVkpp+jBddAg4cg== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 14/16] IPsec: Strip @ from IDs in Apple profile Date: Thu, 28 May 2020 17:58:48 +0000 Message-Id: <20200528175850.12638-15-michael.tremer@ipfire.org> In-Reply-To: <20200528175850.12638-1-michael.tremer@ipfire.org> References: <20200528175850.12638-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- html/cgi-bin/vpnmain.cgi | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 1e4115e95..2e0dd797d 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -1390,14 +1390,28 @@ END # Left ID if ($confighash{$key}[9]) { + my $leftid = $confighash{$key}[9]; + + # Strip leading @ from FQDNs + if ($leftid =~ m/^@(.*)$/) { + $leftid = $1; + } + print " LocalIdentifier\n"; - print " $confighash{$key}[9]\n"; + print " $leftid\n"; } # Right ID if ($confighash{$key}[7]) { + my $rightid = $confighash{$key}[7]; + + # Strip leading @ from FQDNs + if ($rightid =~ m/^@(.*)$/) { + $rightid = $1; + } + print " RemoteIdentifier\n"; - print " $confighash{$key}[7]\n"; + print " $rightid\n"; } if ($confighash{$key}[4] eq "cert") {