From mboxrd@z Thu Jan  1 00:00:00 1970
From: Peter =?utf-8?q?M=C3=BCller?= <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated.
 a2a695be02696854c73c74610f15152614fb4ee5
Date: Thu, 03 Nov 2022 16:51:41 +0000
Message-ID: <4N38t60N9Fz2y1N@people01.haj.ipfire.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6132722645337344945=="
List-Id: <ipfire-scm.lists.ipfire.org>

--===============6132722645337344945==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  a2a695be02696854c73c74610f15152614fb4ee5 (commit)
       via  818dde8e8b8b8cbf571c7d02ba4c8272280f3e46 (commit)
      from  6376c155b8c02c37d891f91d9bf9e60564430d04 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a2a695be02696854c73c74610f15152614fb4ee5
Author: Peter M=C3=BCller <peter.mueller(a)ipfire.org>
Date:   Thu Nov 3 16:51:19 2022 +0000

    Core Update 172: Ship (o|)vpnmain.cgi
   =20
    Signed-off-by: Peter M=C3=BCller <peter.mueller(a)ipfire.org>

commit 818dde8e8b8b8cbf571c7d02ba4c8272280f3e46
Author: Peter M=C3=BCller <peter.mueller(a)ipfire.org>
Date:   Thu Nov 3 15:29:32 2022 +0000

    IPsec/OpenVPN: Use 4,096-bit RSA for host certificates as well
   =20
    We already moved away from 2048-MODP in Core Update 170. Similarly,
    German Federal Office for Information Security (BSI) recommends shifting
    away from RSA keys below 3,000 bits by the end of 2022 at the latest.
   =20
    The only place left in IPFire 2.x where we generate such keys is for
    IPsec and OpenVPN host certificates. This patch increases their key
    sizes to 4,096 bits as well - CA certificates already have this length.
   =20
    Existing VPN connections cannot be migrated automatically. However, only
    the respective host certificate has to be regenerated - thanks to the CA
    certificates' key length being sufficient, there is no need to replace
    the entire VPN CA.
   =20
    Signed-off-by: Peter M=C3=BCller <peter.mueller(a)ipfire.org>
    Reviewed-by: Michael Tremer <michael.tremer(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/rootfiles/core/172/filelists/files |  2 ++
 html/cgi-bin/ovpnmain.cgi                 | 10 ++++------
 html/cgi-bin/vpnmain.cgi                  |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

Difference in files:
diff --git a/config/rootfiles/core/172/filelists/files b/config/rootfiles/cor=
e/172/filelists/files
index f69f05489..d73430dae 100644
--- a/config/rootfiles/core/172/filelists/files
+++ b/config/rootfiles/core/172/filelists/files
@@ -2,5 +2,7 @@ usr/lib/firewall/rules.pl
 usr/local/bin/addonctrl
 usr/local/bin/openvpnctrl
 usr/local/bin/wirelessctrl
+srv/web/ipfire/cgi-bin/ovpnmain.cgi
 srv/web/ipfire/cgi-bin/services.cgi
+srv/web/ipfire/cgi-bin/vpnmain.cgi
 var/ipfire/backup/bin/backup.pl
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 90d3710e4..f85d610d8 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -2,7 +2,7 @@
 ############################################################################=
###
 #                                                                           =
  #
 # IPFire.org - A linux based firewall                                       =
  #
-# Copyright (C) 2007-2014  IPFire Team  <info(a)ipfire.org>                 =
    #
+# Copyright (C) 2007-2022  IPFire Team  <info(a)ipfire.org>                 =
    #
 #                                                                           =
  #
 # This program is free software: you can redistribute it and/or modify      =
  #
 # it under the terms of the GNU General Public License as published by      =
  #
@@ -18,9 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.     =
  #
 #                                                                           =
  #
 ############################################################################=
###
-###
-# Based on IPFireCore 77
-###
+
 use CGI;
 use CGI qw/:standard/;
 use Imager::QRCode;
@@ -1970,7 +1968,7 @@ END
 	    }
 	} else {	# child
 	    unless (exec ('/usr/bin/openssl', 'req', '-nodes',
-			'-newkey', 'rsa:2048',
+			'-newkey', 'rsa:4096',
 			'-keyout', "${General::swroot}/ovpn/certs/serverkey.pem",
 			'-out', "${General::swroot}/ovpn/certs/serverreq.pem",
 			'-extensions', 'server',
@@ -4363,7 +4361,7 @@ if ($cgiparams{'TYPE'} eq 'net') {
 		}
 	    } else {	# child
 		unless (exec ('/usr/bin/openssl', 'req', '-nodes',
-			'-newkey', 'rsa:2048',
+			'-newkey', 'rsa:4096',
 			'-keyout', "${General::swroot}/ovpn/certs/$cgiparams{'NAME'}key.pem",
 			'-out', "${General::swroot}/ovpn/certs/$cgiparams{'NAME'}req.pem",
 			'-config',"${General::swroot}/ovpn/openssl/ovpn.cnf")) {
diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
index fc250b1f5..6c1fd4cf0 100644
--- a/html/cgi-bin/vpnmain.cgi
+++ b/html/cgi-bin/vpnmain.cgi
@@ -1093,7 +1093,7 @@ END
 			&General::log("ipsec", "Creating host cert...");
 			if (open(STDIN, "-|")) {
 				my $opt =3D " req -sha256 -nodes";
-				$opt .=3D " -newkey rsa:2048";
+				$opt .=3D " -newkey rsa:4096";
 				$opt .=3D " -keyout ${General::swroot}/certs/hostkey.pem";
 				$opt .=3D " -out ${General::swroot}/certs/hostreq.pem";
 				$errormessage =3D &callssl ($opt);
@@ -2139,7 +2139,7 @@ END
=20
 		if (open(STDIN, "-|")) {
 			my $opt =3D " req -nodes -rand /proc/interrupts:/proc/net/rt_cache";
-			$opt .=3D " -newkey rsa:2048";
+			$opt .=3D " -newkey rsa:4096";
 			$opt .=3D " -keyout ${General::swroot}/certs/$cgiparams{'NAME'}key.pem";
 			$opt .=3D " -out ${General::swroot}/certs/$cgiparams{'NAME'}req.pem";
=20


hooks/post-receive
--
IPFire 2.x development tree

--===============6132722645337344945==--