mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
oops, switched client/server, in https://github.com/opnsense/core/issues/2459
This commit is contained in:
parent
6c2432a4c7
commit
85f98d121d
@ -414,7 +414,7 @@ function cert_get_purpose($str_crt, $decode = true)
|
||||
$crt_details = openssl_x509_parse($str_crt);
|
||||
$purpose = array();
|
||||
$purpose['ca'] = (stristr($crt_details['extensions']['basicConstraints'], 'CA:TRUE') === false) ? 'No': 'Yes';
|
||||
if (isset($crt_details['extensions']['extendedKeyUsage']) && strstr($crt_details['extensions']['extendedKeyUsage'], "TLS Web Client Authentication") !== false) {
|
||||
if (isset($crt_details['extensions']['extendedKeyUsage']) && strstr($crt_details['extensions']['extendedKeyUsage'], "TLS Web Server Authentication") !== false) {
|
||||
$purpose['server'] = 'Yes';
|
||||
} else {
|
||||
$purpose['server'] = 'No';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user