summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-02-04 19:33:49 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-02-04 19:33:49 +0000
commitea872a2b9e9e8c4fad3189bd10ec53bdfe2a3058 (patch)
tree93dad40619a3925ad8c460fb08f877d0af807c80
parentc65eb83dd8fd9680027b2ceccd78f3585a697707 (diff)
keydata.c is unused.
-rw-r--r--usr.sbin/bind/lib/dns/Makefile.inc4
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/keydata.h55
-rw-r--r--usr.sbin/bind/lib/dns/keydata.c78
3 files changed, 2 insertions, 135 deletions
diff --git a/usr.sbin/bind/lib/dns/Makefile.inc b/usr.sbin/bind/lib/dns/Makefile.inc
index b84f1ea7d6d..96b3877b7ea 100644
--- a/usr.sbin/bind/lib/dns/Makefile.inc
+++ b/usr.sbin/bind/lib/dns/Makefile.inc
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile.inc,v 1.5 2020/02/04 19:30:01 florian Exp $
+# $OpenBSD: Makefile.inc,v 1.6 2020/02/04 19:33:48 florian Exp $
.PATH: ${.CURDIR}/lib/dns
SRCS+= byaddr.c callbacks.c compress.c dns_log.c dns_result.c dns_time.c
SRCS+= ds.c dst_api.c dst_parse.c dst_result.c masterdump.c
-SRCS+= hmac_link.c key.c keydata.c lib.c name.c openssl_link.c message.c
+SRCS+= hmac_link.c key.c lib.c name.c openssl_link.c message.c
SRCS+= ncache.c
SRCS+= rcode.c rdata.c rdatalist.c
SRCS+= rdataset.c tsig.c ttl.c
diff --git a/usr.sbin/bind/lib/dns/include/dns/keydata.h b/usr.sbin/bind/lib/dns/include/dns/keydata.h
deleted file mode 100644
index 67315b31d62..00000000000
--- a/usr.sbin/bind/lib/dns/include/dns/keydata.h
+++ /dev/null
@@ -1,55 +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: keydata.h,v 1.5 2020/01/28 17:17:05 florian Exp $ */
-
-#ifndef DNS_KEYDATA_H
-#define DNS_KEYDATA_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file dns/keydata.h
- * \brief
- * KEYDATA utilities.
- */
-
-/***
- *** Imports
- ***/
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-#include <dns/types.h>
-#include "rdatastruct.h"
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-dns_keydata_todnskey(dns_rdata_keydata_t *keydata,
- dns_rdata_dnskey_t *dnskey);
-
-isc_result_t
-dns_keydata_fromdnskey(dns_rdata_keydata_t *keydata,
- dns_rdata_dnskey_t *dnskey,
- uint32_t refresh, uint32_t addhd,
- uint32_t removehd);
-
-ISC_LANG_ENDDECLS
-
-#endif /* DNS_KEYDATA_H */
diff --git a/usr.sbin/bind/lib/dns/keydata.c b/usr.sbin/bind/lib/dns/keydata.c
deleted file mode 100644
index 2aa64578daa..00000000000
--- a/usr.sbin/bind/lib/dns/keydata.c
+++ /dev/null
@@ -1,78 +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: keydata.c,v 1.7 2020/01/28 17:17:05 florian Exp $ */
-
-/*! \file */
-
-
-#include <stdlib.h>
-
-#include <isc/buffer.h>
-#include <string.h>
-#include <isc/util.h>
-
-#include <dns/rdata.h>
-#include "rdatastruct.h"
-#include <dns/keydata.h>
-
-isc_result_t
-dns_keydata_todnskey(dns_rdata_keydata_t *keydata,
- dns_rdata_dnskey_t *dnskey)
-{
- REQUIRE(keydata != NULL && dnskey != NULL);
-
- dnskey->common.rdtype = dns_rdatatype_dnskey;
- dnskey->common.rdclass = keydata->common.rdclass;
- dnskey->flags = keydata->flags;
- dnskey->protocol = keydata->protocol;
- dnskey->algorithm = keydata->algorithm;
-
- dnskey->datalen = keydata->datalen;
-
- dnskey->data = malloc(dnskey->datalen);
- if (dnskey->data == NULL)
- return (ISC_R_NOMEMORY);
- memmove(dnskey->data, keydata->data, dnskey->datalen);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-dns_keydata_fromdnskey(dns_rdata_keydata_t *keydata,
- dns_rdata_dnskey_t *dnskey,
- uint32_t refresh, uint32_t addhd,
- uint32_t removehd)
-{
- REQUIRE(keydata != NULL && dnskey != NULL);
-
- keydata->common.rdtype = dns_rdatatype_keydata;
- keydata->common.rdclass = dnskey->common.rdclass;
- keydata->refresh = refresh;
- keydata->addhd = addhd;
- keydata->removehd = removehd;
- keydata->flags = dnskey->flags;
- keydata->protocol = dnskey->protocol;
- keydata->algorithm = dnskey->algorithm;
-
- keydata->datalen = dnskey->datalen;
- keydata->data = malloc(keydata->datalen);
- if (keydata->data == NULL)
- return (ISC_R_NOMEMORY);
- memmove(keydata->data, dnskey->data, keydata->datalen);
-
- return (ISC_R_SUCCESS);
-}