mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +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 ($) {
|
sub getCNfromcert ($) {
|
||||||
#&General::log("ipsec", "Extracting name from $_[0]...");
|
#&General::log("ipsec", "Extracting name from $_[0]...");
|
||||||
my $temp = `/usr/bin/openssl x509 -text -in $_[0]`;
|
my $temp = `/usr/bin/openssl x509 -text -in $_[0]`;
|
||||||
$temp =~ /Subject:.*CN = (.*)[\n]/;
|
$temp =~ /Subject:.*CN\s*=\s*(.*)[\n]/;
|
||||||
$temp = $1;
|
$temp = $1;
|
||||||
$temp =~ s+/Email+, E+;
|
$temp =~ s+/Email+, E+;
|
||||||
$temp =~ s/ ST = / S = /;
|
$temp =~ s/ ST = / S = /;
|
||||||
|
|||||||
Reference in New Issue
Block a user