diff util/dns.lua @ 14227:f50685c55a1c

util.dns: Include numbers with flags in TLSA textual representations
author Kim Alvefur <zash@zash.se>
date Fri, 12 Jun 2026 23:08:25 +0200
parents d10957394a3c
children
line wrap: on
line diff
--- a/util/dns.lua	Fri Jun 12 23:08:09 2026 +0200
+++ b/util/dns.lua	Fri Jun 12 23:08:25 2026 +0200
@@ -119,22 +119,22 @@
 
 -- Acronyms from RFC 7218
 local tlsa_usages = {
-	[0] = "PKIX-CA";
-	[1] = "PKIX-EE";
-	[2] = "DANE-TA";
-	[3] = "DANE-EE";
-	[255] = "PrivCert";
+	[0] = "PKIX-CA(0)";
+	[1] = "PKIX-EE(1)";
+	[2] = "DANE-TA(2)";
+	[3] = "DANE-EE(3)";
+	[255] = "PrivCert(255)";
 };
 local tlsa_selectors = {
-	[0] = "Cert",
-	[1] = "SPKI",
-	[255] = "PrivSel",
+	[0] = "Cert(0)",
+	[1] = "SPKI(1)",
+	[255] = "PrivSel(255)",
 };
 local tlsa_match_types = {
-	[0] = "Full",
-	[1] = "SHA2-256",
-	[2] = "SHA2-512",
-	[255] = "PrivMatch",
+	[0] = "Full(0)",
+	[1] = "SHA2-256(1)",
+	[2] = "SHA2-512(2)",
+	[255] = "PrivMatch(255)",
 };
 local tlsa_mt = {
 	__tostring = function(rr)