]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
ovpnmain.cgi: Fix spacing in client configuration file
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 11 Apr 2024 19:24:22 +0000 (21:24 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 2 Jun 2025 19:46:39 +0000 (19:46 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index 1d180d144bafdb38549d1942dc7f5f01484495b0..ddedfd19f098c3ed95e7c4d45c010da85ee14266 100644 (file)
@@ -2405,34 +2405,32 @@ END
                        print "providers legacy default\n";
                }
 
-               print "\n";
-
                # CA
                open(FILE, "<${General::swroot}/ovpn/ca/cacert.pem");
-               print "<ca>\n";
+               print "\n<ca>\n";
                while (<FILE>) {
                        chomp($_);
                        print "$_\n";
                }
-               print "</ca>\n\n";
+               print "</ca>\n";
                close(FILE);
 
                # PKCS12
                open(FILE, "<${General::swroot}/ovpn/certs/${name}.p12");
-               print "<pkcs12>\n";
+               print "\n<pkcs12>\n";
                print &MIME::Base64::encode_base64(do { local $/; <FILE> });
-               print "</pkcs12>\n\n";
+               print "</pkcs12>\n";
                close(FILE);
 
                # TLS auth
                if ($vpnsettings{'TLSAUTH'} eq 'on') {
                        open(FILE, "<${General::swroot}/ovpn/certs/ta.key");
-                       print "<tls-auth>\n";
+                       print "\n<tls-auth>\n";
                        while (<FILE>) {
                                chomp($_);
                                print "$_\n";
                        }
-                       print "</tls-auth>\n\n";
+                       print "</tls-auth>\n";
                        close(FILE);
                }
        }