238,6 → 238,15 |
} |
} |
break; |
|
case 'https_login': // Set HTTPS login status |
if ($_POST['https_login'] === 'on') { |
exec('sudo /usr/local/bin/alcasar-https.sh --on'); |
} else { |
exec('sudo /usr/local/bin/alcasar-https.sh --off'); |
} |
header('Location: '.$_SERVER['PHP_SELF']); |
exit(); |
} |
|
// Network changes |
617,7 → 626,7 |
<tr><td colspan="2" valign="middle" align="left"> |
<center><h3><?= $l_dhcp_state ?> : <?= ${'l_DHCP_'.$conf['DHCP']} ?></h3></center> |
<form action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="POST"> |
<select name="choix">"; |
<select name="choix"> |
<option value="DHCP_Off"<?= ((!strcmp($conf['DHCP'], 'off')) ? ' selected' : '') ?>><?= $l_DHCP_off ?></option> |
<option value="DHCP_On"<?= ((!strcmp($conf['DHCP'], 'on')) ? ' selected' : '') ?>><?= $l_DHCP_on ?></option> |
</select> |
700,16 → 709,24 |
</table> |
<table width="100%" cellspacing="0" cellpadding="5" border="1"> |
<tr> |
<td width="50%"> |
<h3>Importer un certificat existant</h3> |
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>" enctype="multipart/form-data"> |
<?= $l_private_key;?> <input type="file" name="key"><br> |
<?= $l_certificate;?> <input type="file" name="crt"><br> |
<?= $l_server_chain;?> <input type="file" name="sc"><br> |
<input type="hidden" name="choix" value="import_cert"> |
<input type="submit" value="<?= $l_import ?>"> |
<td width="50%" valign="top"> |
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>"> |
<input type="hidden" name="choix" value="https_login"> |
<span>Autoriser les utilisateurs à se connecter de manière non sécurisée :</span><br> |
<select name="https_login"> |
<option value="on"<?= (($conf['HTTPS_LOGIN'] === 'on') ? ' selected' : '') ?>>Non</option> |
<option value="off"<?= (($conf['HTTPS_LOGIN'] === 'off') ? ' selected' : '') ?>>Oui</option> |
</select> |
<input type="submit" value="<?= $l_apply ?>"><br> |
<span>/!\ Les identifiants de connexion seront envoyés en clair.</span> |
</form> |
|
<br> |
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>"> |
<input type="hidden" name="choix" value="default_cert"> |
<input type="submit" value="<?= $l_default_cert ?>" <?= (!file_exists('/etc/pki/tls/certs/alcasar.crt.old') || !file_exists('/etc/pki/tls/private/alcasar.key.old')) ? ' disabled' : '' ?>> |
</form> |
</td> |
<td width="50%" valign="top"> |
<?php |
$certificateInfos = openssl_x509_parse(file_get_contents('/etc/pki/tls/certs/alcasar.crt')); |
|
719,10 → 736,6 |
$CAdomain = $certificateInfos['issuer']['CN']; |
$CAorganization = (isset($certificateInfos['issuer']['O'])) ? $certificateInfos['issuer']['O'] : ''; |
?> |
|
<br> |
<hr> |
|
<h3><?= $l_current_certificate ?></h3> |
Expiration Date : <?= $cert_expiration_date ?><br> |
Common name : <?= $domain ?><br> |
730,11 → 743,17 |
<h4><?= $l_validated ?></h4> |
Common name : <?= $CAdomain ?><br> |
Organization : <?= $CAorganization ?><br> |
|
<br> |
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>"> |
<input type="hidden" name="choix" value="default_cert"> |
<input type="submit" value="<?= $l_default_cert ?>" <?= (!file_exists('/etc/pki/tls/certs/alcasar.crt.old') || !file_exists('/etc/pki/tls/private/alcasar.key.old')) ? ' disabled' : '' ?>> |
</td> |
</tr> |
<tr> |
<td width="50%" valign="top"> |
<h3>Importer un certificat</h3> |
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>" enctype="multipart/form-data"> |
<?= $l_private_key;?> <input type="file" name="key"><br> |
<?= $l_certificate;?> <input type="file" name="crt"><br> |
<?= $l_server_chain;?> <input type="file" name="sc"><br> |
<input type="hidden" name="choix" value="import_cert"> |
<input type="submit" value="<?= $l_import ?>"> |
</form> |
</td> |
<td width="50%" valign="top"> |
751,7 → 770,7 |
} |
?> |
<h3>Intégration Let's Encrypt</h3> |
<?php if ($step === 1) : ?> |
<?php if ($step === 1): ?> |
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>"> |
<input type="hidden" name="choix" value="le_issueCert"> |
Status : Inactif<br> |