1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- if (processForm()) {
- $values = nsParseCommonRequirements();
- if (!($_POST['use'] >= 0 AND $_POST['use'] <= 3))
- output(403, 'Wrong value for <code>use</code>.');
- if (!($_POST['selector'] === '0' OR $_POST['selector'] === '1'))
- output(403, 'Wrong value for <code>selector</code>.');
- if (!($_POST['type'] >= 0 AND $_POST['type'] <= 2))
- output(403, 'Wrong value for <code>type</code>.');
- if (!(preg_match('/^[a-zA-Z0-9.-]{1,1024}$/', $_POST['content'])))
- output(403, 'Wrong value for <code>content</code>.');
- knotcZoneExec($_POST['zone'], array(
- $values['domain'],
- $values['ttl'],
- 'TLSA',
- $_POST['use'],
- $_POST['selector'],
- $_POST['type'],
- $_POST['content']
- ));
- output(200, 'Enregistrement ajouté/retiré.');
- }
- ?>
- <p>
- <?= linkToDocs('record-tlsa', 'Documentation du type d\'enregistrement TLSA') ?>
- </p>
- <form method="post">
- <?php require 'form.ns.php'; ?>
- <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">
- </form>
|