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).
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"){