mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 08:09:42 +00:00
VPN: IPsec: Connections - omit conditional authentication properties when not applicable. closes https://github.com/opnsense/core/issues/6807
This commit is contained in:
parent
fc0f2c746d
commit
a702cf9fb3
@ -172,11 +172,18 @@ class Swanctl extends BaseModel
|
||||
}
|
||||
$thisnode[$attr_name] = implode(',', $tmp);
|
||||
} elseif ($attr_name == 'pubkeys') {
|
||||
if ((string)$node->auth != 'pubkey') {
|
||||
// explicit skip, pubkeys bound to auth type selection
|
||||
continue;
|
||||
}
|
||||
$tmp = [];
|
||||
foreach (explode(',', (string)$attr) as $item) {
|
||||
$tmp[] = $item . '.pem';
|
||||
}
|
||||
$thisnode[$attr_name] = implode(',', $tmp);
|
||||
} elseif ($attr_name == 'eap_id' && strpos((string)$node->auth, 'eap') === false) {
|
||||
// explicit skip, eap_id is only valid for eap auth types.
|
||||
continue;
|
||||
} else {
|
||||
$thisnode[$attr_name] = (string)$attr;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user