Also take care of ph1 mobile settings for eap-tls

This commit is contained in:
Ermal LUÇI 2015-01-14 17:02:19 +01:00
parent 38f77f4ff5
commit 54ab1bdcaa

View File

@ -627,9 +627,16 @@ EOD;
}
break;
case 'eap-tls':
$authentication = "leftauth=eap-tls\n\trightauth=eap-tls";
if (!empty($ph1ent['certref']))
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
if (isset($ph1ent['mobile'])) {
$authentication = "eap_identity=%identity\n\t";
$authentication .= "leftauth=pubkey\n\trightauth=eap-tls";
if (!empty($ph1ent['certref']))
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
} else
$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";