]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
ovpnmain.cgi: Remove certificate warnings
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Mar 2024 15:02:34 +0000 (16:02 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 2 Jun 2025 19:44:58 +0000 (19:44 +0000)
I believe that these don't really work and are always shown.
Please see #13634.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index 76b2cd7784f074951df92791f2d4ebb96a278e6c..4c0ab48c51fc87f7d05840999b361fe837b4c7ef 100644 (file)
@@ -102,8 +102,6 @@ $cgiparams{'DCIPHER'} = '';
 $cgiparams{'DAUTH'} = '';
 $cgiparams{'TLSAUTH'} = '';
 $routes_push_file = "${General::swroot}/ovpn/routes_push";
-# Perform crypto and configration test
-&pkiconfigcheck;
 
 # Add CCD files if not already presant
 unless (-e $routes_push_file) {
@@ -226,35 +224,6 @@ sub deletebackupcert
        }
 }
 
-###
-### Check for PKI and configure problems
-###
-
-sub pkiconfigcheck
-{
-       # Warning if md5 is in usage
-       if (-f "${General::swroot}/ovpn/certs/servercert.pem") {
-               my @signature = &General::system_output("/usr/bin/openssl", "x509", "-noout", "-text", "-in", "${General::swroot}/ovpn/certs/servercert.pem");
-               if (grep(/md5WithRSAEncryption/, @signature) ) {
-                       $cryptoerror = "$Lang::tr{'ovpn error md5'}";
-                       goto CRYPTO_ERROR;
-               }
-       }
-
-       CRYPTO_ERROR:
-
-       # Warning if certificate is not compliant to RFC3280 TLS rules
-       if (-f "${General::swroot}/ovpn/certs/servercert.pem") {
-               my @extendkeyusage = &General::system_output("/usr/bin/openssl", "x509", "-noout", "-text", "-in", "${General::swroot}/ovpn/certs/servercert.pem");
-               if ( ! grep(/TLS Web Server Authentication/, @extendkeyusage)) {
-                       $cryptowarning = "$Lang::tr{'ovpn warning rfc3280'}";
-                       goto CRYPTO_WARNING;
-               }
-       }
-
-       CRYPTO_WARNING:
-}
-
 sub writeserverconf {
     my %sovpnsettings = ();
     my @temp = ();