From patchwork Thu Jun 15 19:55:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6936 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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4QhtLR4d79z3wjp for ; Thu, 15 Jun 2023 19:55:11 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4QhtLQ1Bm5z1YH; Thu, 15 Jun 2023 19:55:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4QhtLP6152z2yjv; Thu, 15 Jun 2023 19:55:09 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4QhtLN2ZlYz2xbG for ; Thu, 15 Jun 2023 19:55:08 +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) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4QhtLL0St6zvS; Thu, 15 Jun 2023 19:55:06 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1686858906; 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; bh=E319y+pF3Ipn4SrBbed0vEWPhN3x1oXrl+tlC4kQUdA=; b=afc9mhVYtEcgahulFxer0Z42KiV80n/Owf6QdYgdTyXmCn9t24t+Wa1OXHU2ipcGw4A/Fi wOTHYtUAYOGuIKAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1686858906; 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; bh=E319y+pF3Ipn4SrBbed0vEWPhN3x1oXrl+tlC4kQUdA=; b=nNYmUFEsLpeLW1RSTjEB6orDF7vbqC4fv5QdBBOW1auJeIdCKieC0kiwrs/2sBLzA6n2Kr 5KFa3m6jHmq0DosVfxLfVRju4C/VNZ7Yv/kkXDfhMLVOFfjSubUI4YRqD8AyCoECB7VRhh CmtJscclgbysvmygynzQs77HHlnim+4NQeJFm4UXznwBzUsj9DclctnNvfu/ahdNH592bj hG7oUE7O8Jilj2RE19W3knu1vI99KbvQtOhaMKV30yfpv/ZiG+bQCGzQZS4NV+amBar8qB wTvuCCTbEX+GkBJKPzTzRzs5rn9MlbQRM7Y9rRpd5cTqDYd+vMPy83e/31lkLw== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] vpnmain.cgi: unique_subject = yes in index.txt.attr for first attempt with fresh install Date: Thu, 15 Jun 2023 21:55:01 +0200 Message-ID: <20230615195501.11141-1-adolf.belka@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: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - The patches for Bug#13138 https://patchwork.ipfire.org/project/ipfire/patch/20230603140541.13834-1-adolf.belka@ipfire.org/ https://patchwork.ipfire.org/project/ipfire/patch/20230606104050.8290-1-adolf.belka@ipfire.org/ work for an update to Core Update 175 but a fresh install of CU175 will still fail with the error when creating the root/host certificate set for the first time. - This patch ensures that the unique_subject = yes line is addeed to index.txt.attr when the root/host certificate set is attempted to be created or is uploaded also for the first attempt. Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/vpnmain.cgi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index f2aeecdf9..63f875c6a 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -870,6 +870,8 @@ END } elsif ($cgiparams{'ACTION'} eq $Lang::tr{'generate root/host certificates'} || $cgiparams{'ACTION'} eq $Lang::tr{'upload p12 file'}) { + &newcleanssldatabase(); + if (-f "${General::swroot}/ca/cacert.pem") { $errormessage = $Lang::tr{'valid root certificate already exists'}; goto ROOTCERT_SKIP;