]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
vpnmain.cgi: Fix reading common names from certificates
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Mar 2018 19:58:11 +0000 (19:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Mar 2018 19:59:14 +0000 (19:59 +0000)
OpenSSL has changed the output of the subject lines of
certificates.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/120/filelists/files
html/cgi-bin/vpnmain.cgi

index 180cf0b4d5e8601f5cc45d788650218f30cba736..848d69a97b5e2341d228775d6a3b76758d8a9ea0 100644 (file)
@@ -4,6 +4,7 @@ etc/sysctl.conf
 etc/fcron.daily/openvpn-crl-updater
 etc/rc.d/init.d/dhcp
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
+srv/web/ipfire/cgi-bin/vpnmain.cgi
 usr/lib/python2.7/lib-dynload/_hashlib.so
 usr/lib/python2.7/lib-dynload/_ssl.so
 var/ipfire/langs
index 2a0351ea04c4f31f7b26d0d7ee3e40125f8a6f2b..a52b4d64d9b48d84babe8ec8d1220e4b3d4ddd01 100644 (file)
@@ -199,10 +199,10 @@ sub callssl ($) {
 sub getCNfromcert ($) {
        #&General::log("ipsec", "Extracting name from $_[0]...");
        my $temp = `/usr/bin/openssl x509 -text -in $_[0]`;
-       $temp =~ /Subject:.*CN=(.*)[\n]/;
+       $temp =~ /Subject:.*CN = (.*)[\n]/;
        $temp = $1;
        $temp =~ s+/Email+, E+;
-       $temp =~ s/ ST=/ S=/;
+       $temp =~ s/ ST = / S = /;
        $temp =~ s/,//g;
        $temp =~ s/\'//g;
        return $temp;
@@ -216,7 +216,7 @@ sub getsubjectfromcert ($) {
        $temp =~ /Subject: (.*)[\n]/;
        $temp = $1;
        $temp =~ s+/Email+, E+;
-       $temp =~ s/ ST=/ S=/;
+       $temp =~ s/ ST = / S = /;
        return $temp;
 }
 ###