]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/dnssec/ta: remove unused kr_ta_covers() function
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 6 May 2021 13:31:11 +0000 (15:31 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 10 May 2021 16:36:18 +0000 (18:36 +0200)
It was word-for-word identical with kr_ta_get_longest_name() anyway,
except for additional pointer->bool conversion.

lib/dnssec/ta.c
lib/dnssec/ta.h

index 7d0cea47ef0885632b10dd156663d2bc282e4b1c..dc69e0fc9c5668074c39beba5db03ae3ebcdb581 100644 (file)
@@ -137,20 +137,6 @@ int kr_ta_add(map_t *trust_anchors, const knot_dname_t *name, uint16_t type,
        }
 }
 
-int kr_ta_covers(map_t *trust_anchors, const knot_dname_t *name)
-{
-       while(name) {
-               if (kr_ta_get(trust_anchors, name)) {
-                       return true;
-               }
-               if (name[0] == '\0') {
-                       return false;
-               }
-               name = knot_wire_next_label(name, NULL);
-       }
-       return false;
-}
-
 /* Delete record data */
 static int del_record(const char *k, void *v, void *ext)
 {
index 8f3885a280afaf722a1a92d2bc17efbdf1da21ea..197589afa0e3ffc75f3abcf39d4024b652bb7b2c 100644 (file)
@@ -31,16 +31,6 @@ KR_EXPORT
 int kr_ta_add(map_t *trust_anchors, const knot_dname_t *name, uint16_t type,
                uint32_t ttl, const uint8_t *rdata, uint16_t rdlen);
 
-/**
- * Return true if the name is below/at any TA in the store.
- * This can be useful to check if it's possible to validate a name beforehand.
- * @param  trust_anchors trust store
- * @param  name          name of the TA
- * @return boolean
- */
-KR_EXPORT KR_PURE
-int kr_ta_covers(map_t *trust_anchors, const knot_dname_t *name);
-
 struct kr_context;
 
 /**
@@ -90,3 +80,4 @@ void kr_ta_clear(map_t *trust_anchors);
  */
 KR_EXPORT
 const knot_dname_t *kr_ta_get_longest_name(map_t *trust_anchors, const knot_dname_t *name);
+