mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
(legacy/ipsec) fixes for certref, caref, trust config data instead of reengineering authentication_method again...
This commit is contained in:
parent
3724aecb79
commit
8c61c4f487
@ -579,9 +579,6 @@ EOD;
|
||||
switch ($ph1ent['authentication_method']) {
|
||||
case 'eap-tls':
|
||||
$authentication = "leftauth=eap-tls\n\trightauth=eap-tls";
|
||||
if (!empty($ph1ent['certref'])) {
|
||||
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
|
||||
}
|
||||
break;
|
||||
case 'xauth_rsa_server':
|
||||
$authentication = "leftauth = pubkey\n\trightauth = pubkey";
|
||||
@ -602,6 +599,19 @@ EOD;
|
||||
$authentication .= "\n\trightauth2 = xauth";
|
||||
break;
|
||||
}
|
||||
if (!empty($ph1ent['certref'])) {
|
||||
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
|
||||
}
|
||||
if (!empty($ph1ent['caref'])) {
|
||||
$ca = lookup_ca($ph1ent['caref']);;
|
||||
if (!empty($ca)) {
|
||||
$rightca = "";
|
||||
foreach (cert_get_subject_array($ca['crt']) as $ca_field) {
|
||||
$rightca .= "{$ca_field['a']}={$ca_field['v']}/";
|
||||
}
|
||||
$authentication .= "\n\trightca=\"/$rightca\"";
|
||||
}
|
||||
}
|
||||
$left_spec = $ep;
|
||||
|
||||
if (isset($ph1ent['reauth_enable'])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user