2022-05-22 14:59:45 +02:00
|
|
|
<?php require "../../common/html.php"; ?>
|
2021-05-22 14:07:25 +02:00
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
|
2022-05-22 17:47:00 +02:00
|
|
|
<?php require "../../form.ns.php"; ?>
|
2022-04-18 16:05:00 +02:00
|
|
|
|
|
|
|
<br>
|
|
|
|
<label for="use">Utilisation</label>
|
|
|
|
<br>
|
|
|
|
<select required="" name="use" id="use">
|
|
|
|
<option value="" selected="" disabled="">-</option>
|
|
|
|
<option value="0">0 (PKIX-TA, <abbr title="also known as">aka<abbr> CA constraint)</option>
|
|
|
|
<option value="1">1 (PKIX-EE, <abbr title="also known as">aka<abbr> Service certificate constraint)</option>
|
|
|
|
<option value="2">2 (DANE-TA, <abbr title="also known as">aka<abbr> Trust Anchor Assertion)</option>
|
|
|
|
<option value="3">3 (DANE-EE, <abbr title="also known as">aka<abbr> Domain issued certificate)</option>
|
|
|
|
</select>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<label for="selector">Selecteur</label>
|
|
|
|
<br>
|
|
|
|
<select required="" name="selector" id="selector">
|
|
|
|
<option value="" selected="" disabled="">-</option>
|
|
|
|
<option value="0">0 (le certificat entier doit correspondre)</option>
|
|
|
|
<option value="1">1 (la clé publique du certificat doit correspondre)</option>
|
|
|
|
</select>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<label for="type">Type de correspondance</label>
|
|
|
|
<br>
|
|
|
|
<select required="" name="type" id="type">
|
|
|
|
<option value="" selected="" disabled="">-</option>
|
|
|
|
<option value="0">0 (certificat entier)</option>
|
|
|
|
<option value="1">1 (SHA-256)</option>
|
|
|
|
<option value="2">2 (SHA-512)</option>
|
|
|
|
</select>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<label for="content">Contenu</label>
|
|
|
|
<br>
|
|
|
|
<input id="content" minlenght="3" maxlength="1024" pattern="^[a-zA-Z0-9.-]{3,1024}$" placeholder="gjioerjgioer" name="content" type="text">
|
|
|
|
<br>
|
|
|
|
<input value="Valider" type="submit">
|
2021-05-22 14:07:25 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
switchToFormProcess();
|
2021-05-22 14:07:25 +02:00
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
$values = nsParseCommonRequirements();
|
2021-05-22 14:07:25 +02:00
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
if (!($_POST['use'] >= 0 AND $_POST['use'] <= 3))
|
|
|
|
userError("Wrong value for <code>use</code>.");
|
2021-05-22 14:07:25 +02:00
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
if (!($_POST['selector'] === "0" OR $_POST['selector'] === "1"))
|
|
|
|
userError("Wrong value for <code>selector</code>.");
|
2021-05-22 14:07:25 +02:00
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
if (!($_POST['type'] >= 0 AND $_POST['type'] <= 2))
|
|
|
|
userError("Wrong value for <code>type</code>.");
|
2021-05-22 14:07:25 +02:00
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
if (!(preg_match("/^[a-zA-Z0-9.-]{1,1024}$/", $_POST['content'])))
|
|
|
|
userError("Wrong value for <code>content</code>.");
|
2021-05-22 14:07:25 +02:00
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
knotcExec($_POST['zone'], array(
|
|
|
|
$values['domain'],
|
|
|
|
$values['ttl'],
|
|
|
|
"TLSA",
|
|
|
|
$_POST['use'],
|
|
|
|
$_POST['selector'],
|
|
|
|
$_POST['type'],
|
|
|
|
$_POST['content']
|
|
|
|
));
|
2022-05-25 01:16:41 +02:00
|
|
|
|
2022-05-31 17:31:48 +02:00
|
|
|
success("Enregistrement ajouté");
|