diff options
| author | 2020-02-23 23:40:21 +0000 | |
|---|---|---|
| committer | 2020-02-23 23:40:21 +0000 | |
| commit | afc94c37458f3fb1a93f727a90bf1f56b6e5eee6 (patch) | |
| tree | 0468682389171f3638ccc7792ebf1dbc775a3212 /usr.bin/dig/lib/dns | |
| parent | rmeove more unused functions and code (diff) | |
| download | wireguard-openbsd-afc94c37458f3fb1a93f727a90bf1f56b6e5eee6.tar.xz wireguard-openbsd-afc94c37458f3fb1a93f727a90bf1f56b6e5eee6.zip | |
remove some unused functions
ok jung@
Diffstat (limited to 'usr.bin/dig/lib/dns')
| -rw-r--r-- | usr.bin/dig/lib/dns/include/dst/dst.h | 4 | ||||
| -rw-r--r-- | usr.bin/dig/lib/dns/key.c | 31 |
2 files changed, 2 insertions, 33 deletions
diff --git a/usr.bin/dig/lib/dns/include/dst/dst.h b/usr.bin/dig/lib/dns/include/dst/dst.h index a9ba221dbe5..9d7c9bb985d 100644 --- a/usr.bin/dig/lib/dns/include/dst/dst.h +++ b/usr.bin/dig/lib/dns/include/dst/dst.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dst.h,v 1.9 2020/02/23 08:54:01 florian Exp $ */ +/* $Id: dst.h,v 1.10 2020/02/23 23:40:21 jsg Exp $ */ #ifndef DST_DST_H #define DST_DST_H 1 @@ -303,8 +303,6 @@ dst_key_sigsize(const dst_key_t *key, unsigned int *n); uint16_t dst_region_computeid(const isc_region_t *source, unsigned int alg); -uint16_t -dst_region_computerid(const isc_region_t *source, unsigned int alg); /*%< * Computes the (revoked) key id of the key stored in the provided * region with the given algorithm. 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); |
