96 |
96 |
$pconfig['pskey'] = $a_phase1[$p1index]['pre-shared-key'];
|
97 |
97 |
} else {
|
98 |
98 |
$pconfig['certref'] = $a_phase1[$p1index]['certref'];
|
|
99 |
$pconfig['caref'] = $a_phase1[$p1index]['caref'];
|
99 |
100 |
}
|
100 |
101 |
|
101 |
102 |
$pconfig['descr'] = $a_phase1[$p1index]['descr'];
|
... | ... | |
142 |
143 |
$reqdfields = explode(" ", "pskey");
|
143 |
144 |
$reqdfieldsn = array(gettext("Pre-Shared Key"));
|
144 |
145 |
} else {
|
145 |
|
$reqdfields = explode(" ", "certref");
|
146 |
|
$reqdfieldsn = array(gettext("My Certificate"));
|
|
146 |
$reqdfields = explode(" ", "caref certref");
|
|
147 |
$reqdfieldsn = array(gettext("Certificate Authority"),gettext("Certificate"));
|
147 |
148 |
}
|
148 |
149 |
if (!$pconfig['mobile']) {
|
149 |
150 |
$reqdfields[] = "remotegw";
|
... | ... | |
292 |
293 |
$ph1ent['pre-shared-key'] = $pconfig['pskey'];
|
293 |
294 |
$ph1ent['private-key'] = base64_encode($pconfig['privatekey']);
|
294 |
295 |
$ph1ent['certref'] = $pconfig['certref'];
|
|
296 |
$ph1ent['caref'] = $pconfig['caref'];
|
295 |
297 |
$ph1ent['authentication_method'] = $pconfig['authentication_method'];
|
296 |
298 |
$ph1ent['proposal_check'] = $pconfig['proposal_check'];
|
297 |
299 |
$ph1ent['descr'] = $pconfig['descr'];
|
... | ... | |
374 |
376 |
document.getElementById('opt_psk').style.display = 'none';
|
375 |
377 |
document.getElementById('opt_peerid').style.display = '';
|
376 |
378 |
document.getElementById('opt_cert').style.display = '';
|
|
379 |
document.getElementById('opt_ca').style.display = '';
|
377 |
380 |
break;
|
378 |
381 |
case 'xauth_rsa_server':
|
379 |
382 |
case 'rsasig':
|
380 |
383 |
document.getElementById('opt_psk').style.display = 'none';
|
381 |
384 |
document.getElementById('opt_peerid').style.display = '';
|
382 |
385 |
document.getElementById('opt_cert').style.display = '';
|
|
386 |
document.getElementById('opt_ca').style.display = '';
|
383 |
387 |
break;
|
384 |
388 |
<?php if ($pconfig['mobile']) { ?>
|
385 |
389 |
case 'pre_shared_key':
|
386 |
390 |
document.getElementById('opt_psk').style.display = 'none';
|
387 |
391 |
document.getElementById('opt_peerid').style.display = 'none';
|
388 |
392 |
document.getElementById('opt_cert').style.display = 'none';
|
|
393 |
document.getElementById('opt_ca').style.display = 'none';
|
389 |
394 |
break;
|
390 |
395 |
<?php } ?>
|
391 |
396 |
default: /* psk modes*/
|
392 |
397 |
document.getElementById('opt_psk').style.display = '';
|
393 |
398 |
document.getElementById('opt_peerid').style.display = '';
|
394 |
399 |
document.getElementById('opt_cert').style.display = 'none';
|
|
400 |
document.getElementById('opt_ca').style.display = 'none';
|
395 |
401 |
break;
|
396 |
402 |
}
|
397 |
403 |
}
|
... | ... | |
710 |
716 |
</span>
|
711 |
717 |
</td>
|
712 |
718 |
</tr>
|
|
719 |
<tr id="opt_ca">
|
|
720 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("My Certificate Authority"); ?></td>
|
|
721 |
<td width="78%" class="vtable">
|
|
722 |
<select name='caref' class="formselect">
|
|
723 |
<?php
|
|
724 |
foreach ($config['system']['ca'] as $ca):
|
|
725 |
$selected = "";
|
|
726 |
if ($pconfig['caref'] == $ca['refid'])
|
|
727 |
$selected = "selected";
|
|
728 |
?>
|
|
729 |
<option value="<?=$ca['refid'];?>" <?=$selected;?>><?=$ca['name'];?></option>
|
|
730 |
<?php endforeach; ?>
|
|
731 |
</select>
|
|
732 |
<br>
|
|
733 |
<span class="vexpl">
|
|
734 |
<?=gettext("Select a certificate authority previously configured in the Certificate Manager"); ?>.
|
|
735 |
</span>
|
|
736 |
</td>
|
|
737 |
</tr>
|
713 |
738 |
<tr>
|
714 |
739 |
<td colspan="2" class="list" height="12"></td>
|
715 |
740 |
</tr>
|
Let the user choose the IPsec CA instead of assuming.