From 36cfe2abe10ef86ff74f9b41021b0367b9346ca3 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 12 Dec 2021 10:11:52 +0000 Subject: [PATCH] Use IANA normative names for DS hash algorithms --- util.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/util.c b/util.c index 0b2a2f5..68e479d 100644 --- a/util.c +++ b/util.c @@ -23,10 +23,14 @@ #define MINIMUM_LDNS_REVISION ((1<<16)|(7<<8)|(1)) ldns_lookup_table ldnssec_hashes[] = { - { LDNS_SHA1, "SHA1" }, - { LDNS_SHA256, "SHA256" }, - { LDNS_HASH_GOST, "GOST" }, - { LDNS_SHA384, "SHA384" }, + /* + * Normative names from DS-IANA: + * https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml + */ + { LDNS_SHA1, "SHA-1" }, + { LDNS_SHA256, "SHA-256" }, + { LDNS_HASH_GOST, "GOST R 34.11-94" }, + { LDNS_SHA384, "SHA-384" }, { 0, NULL }, }; @@ -34,9 +38,10 @@ ldns_hash ldnssec_get_hash_algorithm_by_name(const char *name) { static ldns_lookup_table aliases[] = { - { LDNS_SHA1, "SHA-1" }, - { LDNS_SHA256, "SHA-256" }, - { LDNS_SHA384, "SHA-384" }, + { LDNS_SHA1, "SHA1" }, + { LDNS_SHA256, "SHA256" }, + { LDNS_HASH_GOST, "GOST" }, + { LDNS_SHA384, "SHA384" }, { 0, NULL }, }; ldns_lookup_table *lt;