mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
OpenVPN export, decode certificate+private key before usage. for https://github.com/opnsense/core/issues/2787
This commit is contained in:
parent
d001f34479
commit
f623fc6249
@ -367,8 +367,9 @@ class ExportController extends ApiControllerBase
|
||||
$str_crt = base64_decode((string)$cert->crt);
|
||||
$inf_crt = openssl_x509_parse($str_crt);
|
||||
$config['client_cn'] = $inf_crt['subject']['CN'];
|
||||
$config['client_crt'] = (string)$cert->crt;
|
||||
$config['client_prv'] = (string)$cert->prv;
|
||||
$config['client_crt'] = base64_decode((string)$cert->crt);
|
||||
$config['client_prv'] = base64_decode((string)$cert->prv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user