]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
openvpn: Fix verify script.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Dec 2013 14:12:34 +0000 (15:12 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Dec 2013 14:12:34 +0000 (15:12 +0100)
Former versions of openvpn called the script where the arguments
in the certificate's common name where separated by /.
Now, those are separated by ", " (comma, space).

config/ovpn/verify

index 44ed1105df3446204dba7a816a15fc3afe57636d..1a1fcb501d83065ca5fb408580789b993740e921 100644 (file)
@@ -30,8 +30,8 @@ my $CN    = $ARGV[1];
 exit 0 unless ($DEPTH eq "0");
 
 # Strip the CN from the X509 identifier.
-$CN =~ /\/CN=(.*)$/i;
-$CN = $1;
+$CN =~ /(\/|,\ )CN=(.*)$/i;
+$CN = $2;
 
 my %confighash = ();
 if (-f "${General::swroot}/ovpn/ovpnconfig"){