]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/ovpn/verify
openvpn: Fix verify script.
[people/teissler/ipfire-2.x.git] / 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.
 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"){
 
 my %confighash = ();
 if (-f "${General::swroot}/ovpn/ovpnconfig"){