feat: manage TLSA records
This commit is contained in:
1 parent
9c2fb9d15b
commit
a67183b646
14 files changed
+141
-15
No files matched your search
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2026 Bryan Joshua Pedini
|
||||
|
||||
export const EDITABLE_TYPES = ["A", "AAAA", "CNAME", "NS", "MX", "TXT", "SRV", "CAA"];
|
||||
export const EDITABLE_TYPES = ["A", "AAAA", "CNAME", "NS", "MX", "TXT", "SRV", "CAA", "TLSA"];
|
||||
export const KNOWN_TYPES = [...EDITABLE_TYPES, "SOA"];
|
||||
|
||||
export const FIELD_SPECS = {
|
||||
@@ -35,6 +35,12 @@ export const FIELD_SPECS = {
|
||||
{ key: "tag", label: "Tag", placeholder: "issue" },
|
||||
{ key: "value", label: "Value", placeholder: "ca.example.net" },
|
||||
],
|
||||
TLSA: [
|
||||
{ key: "usage", label: "Certificate usage", options: [["0", "0 (PKIX-TA)"], ["1", "1 (PKIX-EE)"], ["2", "2 (DANE-TA)"], ["3", "3 (DANE-EE)"]] },
|
||||
{ key: "selector", label: "Selector", options: [["0", "0 (full certificate)"], ["1", "1 (SubjectPublicKeyInfo)"]] },
|
||||
{ key: "matching_type", label: "Matching type", options: [["0", "0 (exact match)"], ["1", "1 (SHA-256)"], ["2", "2 (SHA-512)"]] },
|
||||
{ key: "certificate", label: "Certificate association data (hex)", multiline: true, hex: true, placeholder: "0123456789abcdef..." },
|
||||
],
|
||||
};
|
||||
|
||||
export function presentValue(record) {
|
||||
@@ -55,6 +61,8 @@ export function presentValue(record) {
|
||||
return data.priority + " " + data.weight + " " + data.port + " " + data.target;
|
||||
case "CAA":
|
||||
return data.flag + " " + data.tag + ' "' + data.value + '"';
|
||||
case "TLSA":
|
||||
return data.usage + " " + data.selector + " " + data.matching_type + " " + data.certificate;
|
||||
case "SOA":
|
||||
return [data.ns, data.MBox !== undefined ? data.MBox : data.mbox, data.serial == null || data.serial === 0 ? "dynamic (Unix time)" : data.serial, data.refresh, data.retry, data.expire, data.minttl].join(" ");
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user