summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/dns/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/dig/lib/dns/key.c')
-rw-r--r--usr.bin/dig/lib/dns/key.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/usr.bin/dig/lib/dns/key.c b/usr.bin/dig/lib/dns/key.c
index 485d53da7dd..d3211b01888 100644
--- a/usr.bin/dig/lib/dns/key.c
+++ b/usr.bin/dig/lib/dns/key.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: key.c,v 1.6 2020/02/22 19:47:06 jung Exp $ */
+/* $Id: key.c,v 1.7 2020/02/23 23:40:21 jsg Exp $ */
@@ -24,8 +24,6 @@
#include <isc/region.h>
#include <isc/util.h>
-#include <dns/keyvalues.h>
-
#include <dst/dst.h>
#include "dst_internal.h"
@@ -55,33 +53,6 @@ dst_region_computeid(const isc_region_t *source, unsigned int alg) {
return ((uint16_t)(ac & 0xffff));
}
-uint16_t
-dst_region_computerid(const isc_region_t *source, unsigned int alg) {
- uint32_t ac;
- const unsigned char *p;
- int size;
-
- REQUIRE(source != NULL);
- REQUIRE(source->length >= 4);
-
- p = source->base;
- size = source->length;
-
- if (alg == DST_ALG_RSAMD5)
- return ((p[size - 3] << 8) + p[size - 2]);
-
- ac = ((*p) << 8) + *(p + 1);
- ac |= DNS_KEYFLAG_REVOKE;
- for (size -= 2, p +=2; size > 1; size -= 2, p += 2)
- ac += ((*p) << 8) + *(p + 1);
-
- if (size > 0)
- ac += ((*p) << 8);
- ac += (ac >> 16) & 0xffff;
-
- return ((uint16_t)(ac & 0xffff));
-}
-
unsigned int
dst_key_size(const dst_key_t *key) {
return (key->key_size);