Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3039 → Rev 3040

/web/acc/admin/network.php
78,12 → 78,13
$l_yes = "Oui";
$l_no = "Non";
$l_ssl_title = "Chiffrer les flux d'authentification entre les utilisateurs et ALCASAR";
$l_cert_from = "Date d'émission";
$l_ssh_title = "SSH";
$l_ssh_port = "Port";
$l_ssh_activate = "Activer SSH";
$l_cert_expiration = "Date d'expiration :";
$l_cert_commonname = "Nom commun :";
$l_cert_organization = "Organisation :";
$l_upload_certificate = "Importer un certificat officiel";
$l_le_renewal = "Renouveler le certificat Let's Encrypt";
$l_le_integration = "Intégrer un certificat Let's Encrypt";
$l_le_status = "Status :";
$l_disabled = "Inactif";
143,13 → 144,14
$l_yes = "Si";
$l_no = "No";
$l_ssl_title = "La autenticación de cifrado fluye entre usuarios y ALCASAR";
$l_cert_from = "Fecha de emisión";
$l_ssh_title = "SSH";
$l_ssh_port = "Puerto";
$l_ssh_activate = "Activar SSH";
$l_cert_expiration = "Fecha de vencimiento:";
$l_cert_commonname = "Common name:";
$l_cert_organization = "Organización:";
$l_upload_certificate = "Importar un certificado";
$l_le_integration = "Integración con Let's Encrypt";
$l_le_renewal = "Renovación del certificado Let's Encrypt";
$l_le_status = "Estado:";
$l_disabled = "Desactivado";
$l_pending_validation = "Validación pendiente";
207,13 → 209,14
$l_yes = "Yes";
$l_no = "No";
$l_ssl_title = "Cipher authentication flows between users and ALCASAR";
$l_cert_from = "Date of issue";
$l_ssh_title = "SSH";
$l_ssh_port = "Port";
$l_ssh_activate = "Activate SSH";
$l_cert_expiration = "Expiration date:";
$l_cert_commonname = "Common name:";
$l_cert_organization = "Organization:";
$l_upload_certificate = "Import an officlal certificate";
$l_le_integration = "Integrate a Let's Encrypt certificate";
$l_le_renewal = "Renewing the Let's Encrypt certificate";
$l_le_status = "Status:";
$l_disabled = "Disabled";
$l_pending_validation = "Pending validation";
370,6 → 373,14
}
}
break;
case 'enable_wan_ssh': // Activate SSH on WAN
if (isset($_POST['togglessh'])) {
exec('sudo /usr/local/bin/alcasar-ssh.sh --on -p'.escapeshellarg($_POST["ssh_port"]));
} else{
exec('sudo /usr/local/bin/alcasar-ssh.sh --off');
}
header('Location: '.$_SERVER['PHP_SELF']);
exit();
case 'https_login': // Set HTTPS login status
if ($_POST['https_login'] === 'on') {
exec('sudo /usr/local/bin/alcasar-https.sh --on');
1167,13 → 1178,26
</div>
<br>
<div class="panel">
<div class="panel-header"><?= $l_ssh_title ?></div>
<div class="panel-row">
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>">
<input type="hidden" name="choix" value="enable_wan_ssh">
<input type="checkbox" name="togglessh" id="togglessh" <?= is_numeric($conf['SSH_WAN'])? "checked": "" ?> onchange="document.getElementById('sshtable').style.display = this.checked ? 'block' : 'none';"> <b>Activer SSH <!-- TODO : Mettre traduction --></b><br>
<div id="sshtable" style="display:<?= is_numeric($conf['SSH_WAN'])? "block": "none" ?>">
<label for="ssh_port"><?= $l_ssh_port ?></label> : <input style="width:120px" type="text" id="ssh_port" name="ssh_port" value="<?= is_numeric($conf['SSH_WAN']) ? $conf['SSH_WAN']:22 ?>" /><br>
</div>
<input type="submit" onClick="document.getElementById('ldoverlay').style.display='block';" value="<?= $l_apply ?>"><br>
</form>
</div>
</div>
<br>
<div class="panel">
<div class="panel-header"><?= $l_import_cert ?></div>
<div class="panel-row">
<div class="panel-cell">
<?php
$certificateInfos = openssl_x509_parse(file_get_contents('/etc/pki/tls/certs/alcasar.crt'));
$certificateInfos = openssl_x509_parse(file_get_contents('/etc/pki/tls/certs/alcasar.crt'));
$cert_expiration_date = date('d-m-Y H:i:s', $certificateInfos['validTo_time_t']);
$cert_from_date = date('d-m-Y H:i:s', $certificateInfos['validFrom_time_t']);
$domain = $certificateInfos['subject']['CN'];
$organization = (isset($certificateInfos['subject']['O'])) ? $certificateInfos['subject']['O'] : '';
$CAdomain = $certificateInfos['issuer']['CN'];
1181,7 → 1205,6
?>
<h3><?= $l_current_certificate ?></h3>
<b><?= $l_cert_commonname ?></b> <?= $domain ?><br>
<b><?= $l_cert_from ?></b> <?= $cert_from_date ?><br>
<b><?= $l_cert_expiration ?></b> <?= $cert_expiration_date ?><br>
<b><?= $l_cert_organization ?></b> <?= $organization ?><br>
<b><?= $l_validated ?></b> <?= $CAdomain ?> (<?= $CAorganization ?>)<br>
1224,10 → 1247,8
} else {
$step = 1;
}
if ($step === 2) {
echo "<h3>$l_le_renewal</h3>";
} else { echo "<h3>$l_le_integration</h3>";}
?>
<h3><?= $l_le_integration ?></h3>
<?php if ($step === 1): ?>
<form method="post" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>">
<input type="hidden" name="choix" value="le_issueCert">
1241,6 → 1262,7
<input type="hidden" name="choix" value="le_renewCert">
<?= $l_le_status ?> <?= $l_pending_validation ?><br>
<?= $l_le_domain_name ?> <?= $LE_conf['domainRequest'] ?><br>
<?= $l_le_ask_on ?> <?= date('d-m-Y H:i:s', $LE_conf['dateIssueRequest']) ?><br>
<?= $l_le_dns_entry_txt ?> "<?= '_acme-challenge.'.$LE_conf['domainRequest'] ?>"<br>
<?= $l_le_challenge ?> "<?= $LE_conf['challenge'] ?>"<br>
<input type="submit" onClick="document.getElementById('ldoverlay').style.display='block';" name="recheck" value="<?= $l_recheck ?>"> <input type="submit" onClick="document.getElementById('ldoverlay').style.display='block';" name="cancel" value="<?= $l_cancel ?>"><br>