mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
OpenVPN: Fix upload check for root and host certificate
Fix for #11766 . Since the new OpenSSL output differs in the 'Subject' section, the regex needed to be adapted. Old and new output should now be possible. Signed-off-by: Erik Kapfer <erik.kapfer@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
c0a7c9b278
commit
87ea30ff56
@@ -4045,7 +4045,7 @@ if ($cgiparams{'TYPE'} eq 'net') {
|
||||
}
|
||||
|
||||
my $temp = `/usr/bin/openssl x509 -text -in ${General::swroot}/ovpn/certs/$cgiparams{'NAME'}cert.pem`;
|
||||
$temp =~ /Subject:.*CN=(.*)[\n]/;
|
||||
$temp =~ /Subject:.*CN\s?=\s?(.*)[\n]/;
|
||||
$temp = $1;
|
||||
$temp =~ s+/Email+, E+;
|
||||
$temp =~ s/ ST=/ S=/;
|
||||
@@ -4099,7 +4099,7 @@ if ($cgiparams{'TYPE'} eq 'net') {
|
||||
}
|
||||
|
||||
my $temp = `/usr/bin/openssl x509 -text -in ${General::swroot}/ovpn/certs/$cgiparams{'NAME'}cert.pem`;
|
||||
$temp =~ /Subject:.*CN=(.*)[\n]/;
|
||||
$temp =~ /Subject:.*CN\s?=\s?(.*)[\n]/;
|
||||
$temp = $1;
|
||||
$temp =~ s+/Email+, E+;
|
||||
$temp =~ s/ ST=/ S=/;
|
||||
|
||||
Reference in New Issue
Block a user