Use IANA normative names for DS hash algorithms

This commit is contained in:
Lucas 2021-12-12 10:11:52 +00:00
parent bea2ef361b
commit 36cfe2abe1

19
util.c
View File

@ -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;