mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 04:52:59 +02:00
vpnmain.cgi: Fix parsing CN from certificates generated by OpenSSL 3.2
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -244,7 +244,7 @@ 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\s*=\s*(.*)[\n]/;
|
||||
$temp = $1;
|
||||
$temp =~ s+/Email+, E+;
|
||||
$temp =~ s/ ST = / S = /;
|
||||
|
||||
Reference in New Issue
Block a user