summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-02-04 19:42:26 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-02-04 19:42:26 +0000
commit8ca0213d7b1543970b98c4807fa944c44f9baf6d (patch)
tree7a458fa65393c944ff6b27a9f3b1f5427cef5166 /usr.sbin
parent53647a72b6626af9db5228b18f3e4499c6bfa370 (diff)
iterated_hash is unused
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.c4
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.h4
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.c3
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.h4
-rw-r--r--usr.sbin/bind/lib/isc/Makefile.inc4
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/iterated_hash.h47
-rw-r--r--usr.sbin/bind/lib/isc/iterated_hash.c48
7 files changed, 7 insertions, 107 deletions
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.c b/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.c
index 540436752aa..8382e975787 100644
--- a/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.c
+++ b/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3_50.c,v 1.5 2020/01/20 18:51:53 florian Exp $ */
+/* $Id: nsec3_50.c,v 1.6 2020/02/04 19:42:25 florian Exp $ */
/*
* Copyright (C) 2004 Nominet, Ltd.
@@ -37,7 +37,6 @@
#ifndef RDATA_GENERIC_NSEC3_50_C
#define RDATA_GENERIC_NSEC3_50_C
-#include <isc/iterated_hash.h>
#include <isc/base32.h>
#define RRTYPE_NSEC3_ATTRIBUTES DNS_RDATATYPEATTR_DNSSEC
@@ -360,6 +359,7 @@ digest_nsec3(ARGS_DIGEST) {
return ((digest)(arg, &r));
}
+#define NSEC3_MAX_HASH_LENGTH 155
static inline isc_boolean_t
checkowner_nsec3(ARGS_CHECKOWNER) {
unsigned char owner[NSEC3_MAX_HASH_LENGTH];
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.h b/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.h
index a4439d4facb..c313030c2e9 100644
--- a/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.h
+++ b/usr.sbin/bind/lib/dns/rdata/generic/nsec3_50.h
@@ -18,13 +18,11 @@
#ifndef GENERIC_NSEC3_50_H
#define GENERIC_NSEC3_50_H 1
-/* $Id: nsec3_50.h,v 1.5 2020/01/20 18:51:53 florian Exp $ */
+/* $Id: nsec3_50.h,v 1.6 2020/02/04 19:42:25 florian Exp $ */
/*!
* \brief Per RFC 5155 */
-#include <isc/iterated_hash.h>
-
typedef struct dns_rdata_nsec3 {
dns_rdatacommon_t common;
dns_hash_t hash;
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.c b/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.c
index 24166a0612c..312303b2bf6 100644
--- a/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.c
+++ b/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3param_51.c,v 1.5 2020/01/20 18:51:53 florian Exp $ */
+/* $Id: nsec3param_51.c,v 1.6 2020/02/04 19:42:25 florian Exp $ */
/*
* Copyright (C) 2004 Nominet, Ltd.
@@ -37,7 +37,6 @@
#ifndef RDATA_GENERIC_NSEC3PARAM_51_C
#define RDATA_GENERIC_NSEC3PARAM_51_C
-#include <isc/iterated_hash.h>
#include <isc/base32.h>
#define RRTYPE_NSEC3PARAM_ATTRIBUTES (DNS_RDATATYPEATTR_DNSSEC)
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.h b/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.h
index 249ec11b814..9c727eff85e 100644
--- a/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.h
+++ b/usr.sbin/bind/lib/dns/rdata/generic/nsec3param_51.h
@@ -18,13 +18,11 @@
#ifndef GENERIC_NSEC3PARAM_51_H
#define GENERIC_NSEC3PARAM_51_H 1
-/* $Id: nsec3param_51.h,v 1.4 2020/01/20 18:51:53 florian Exp $ */
+/* $Id: nsec3param_51.h,v 1.5 2020/02/04 19:42:25 florian Exp $ */
/*!
* \brief Per RFC 5155 */
-#include <isc/iterated_hash.h>
-
typedef struct dns_rdata_nsec3param {
dns_rdatacommon_t common;
dns_hash_t hash;
diff --git a/usr.sbin/bind/lib/isc/Makefile.inc b/usr.sbin/bind/lib/isc/Makefile.inc
index d43cbb4a4b7..99480a59585 100644
--- a/usr.sbin/bind/lib/isc/Makefile.inc
+++ b/usr.sbin/bind/lib/isc/Makefile.inc
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile.inc,v 1.3 2020/02/04 19:06:54 florian Exp $
+# $OpenBSD: Makefile.inc,v 1.4 2020/02/04 19:42:25 florian Exp $
.PATH: ${.CURDIR}/lib/isc
SRCS+= assertions.c base32.c base64.c netaddr.c buffer.c bufferlist.c
SRCS+= error.c event.c hash.c heap.c hex.c hmacmd5.c hmacsha.c
-SRCS+= inet_aton.c iterated_hash.c lex.c log.c md5.c regex.c sockaddr.c
+SRCS+= inet_aton.c lex.c log.c md5.c regex.c sockaddr.c
SRCS+= task.c result.c netscope.c parseint.c refcount.c region.c timer.c
SRCS+= safe.c serial.c sha1.c sha2.c symtab.c
diff --git a/usr.sbin/bind/lib/isc/include/isc/iterated_hash.h b/usr.sbin/bind/lib/isc/include/isc/iterated_hash.h
deleted file mode 100644
index 31d7d488b51..00000000000
--- a/usr.sbin/bind/lib/isc/include/isc/iterated_hash.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: iterated_hash.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */
-
-#ifndef ISC_ITERATED_HASH_H
-#define ISC_ITERATED_HASH_H 1
-
-#include <isc/lang.h>
-#include <isc/sha1.h>
-
-/*
- * The maximal hash length that can be encoded in a name
- * using base32hex. floor(255/8)*5
- */
-#define NSEC3_MAX_HASH_LENGTH 155
-
-/*
- * The maximum has that can be encoded in a single label using
- * base32hex. floor(63/8)*5
- */
-#define NSEC3_MAX_LABEL_HASH 35
-
-ISC_LANG_BEGINDECLS
-
-int isc_iterated_hash(unsigned char out[NSEC3_MAX_HASH_LENGTH],
- unsigned int hashalg, int iterations,
- const unsigned char *salt, int saltlength,
- const unsigned char *in, int inlength);
-
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_ITERATED_HASH_H */
diff --git a/usr.sbin/bind/lib/isc/iterated_hash.c b/usr.sbin/bind/lib/isc/iterated_hash.c
deleted file mode 100644
index 2cfa151b4e7..00000000000
--- a/usr.sbin/bind/lib/isc/iterated_hash.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: iterated_hash.c,v 1.3 2020/01/22 13:02:10 florian Exp $ */
-
-
-
-#include <stdio.h>
-
-#include <isc/sha1.h>
-#include <isc/iterated_hash.h>
-
-int
-isc_iterated_hash(unsigned char out[ISC_SHA1_DIGESTLENGTH],
- unsigned int hashalg, int iterations,
- const unsigned char *salt, int saltlength,
- const unsigned char *in, int inlength)
-{
- isc_sha1_t ctx;
- int n = 0;
-
- if (hashalg != 1)
- return (0);
-
- do {
- isc_sha1_init(&ctx);
- isc_sha1_update(&ctx, in, inlength);
- isc_sha1_update(&ctx, salt, saltlength);
- isc_sha1_final(&ctx, out);
- in = out;
- inlength = ISC_SHA1_DIGESTLENGTH;
- } while (n++ < iterations);
-
- return (ISC_SHA1_DIGESTLENGTH);
-}