sshfp_44.c revision a134177ed9f82189504191d90f3ed9e97c2b47cb
5cd4555ad444fd391002ae32450572054369fd42Rob Austein/*
5cd4555ad444fd391002ae32450572054369fd42Rob Austein * Copyright (C) 2003, 2004, 2006, 2007, 2009, 2011-2013, 2015-2017 Internet Systems Consortium, Inc. ("ISC")
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein *
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson * This Source Code Form is subject to the terms of the Mozilla Public
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User * License, v. 2.0. If a copy of the MPL was not distributed with this
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson */
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson/* $Id$ */
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson/* RFC 4255 */
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#ifndef RDATA_GENERIC_SSHFP_44_C
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#define RDATA_GENERIC_SSHFP_44_C
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#define RRTYPE_SSHFP_ATTRIBUTES (0)
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewsstatic inline isc_result_t
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfromtext_sshfp(ARGS_FROMTEXT) {
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews isc_token_t token;
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson REQUIRE(type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
1753d3c4d74241a847794f7e7cfd94cc79be6600Evan Hunt UNUSED(type);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(rdclass);
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson UNUSED(origin);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(options);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(callbacks);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein /*
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Algorithm.
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson */
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ISC_FALSE));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if (token.value.as_ulong > 0xffU)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETTOK(ISC_R_RANGE);
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews RETERR(uint8_tobuffer(token.value.as_ulong, target));
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein /*
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Digest type.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein */
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ISC_FALSE));
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews if (token.value.as_ulong > 0xffU)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETTOK(ISC_R_RANGE);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETERR(uint8_tobuffer(token.value.as_ulong, target));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein /*
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Digest.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein */
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (isc_hex_tobuffer(lexer, target, -1));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_result_t
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeintotext_sshfp(ARGS_TOTEXT) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_t sr;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein char buf[sizeof("64000 ")];
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein unsigned int n;
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson REQUIRE(rdata->type == dns_rdatatype_sshfp);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson REQUIRE(rdata->length != 0);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson UNUSED(tctx);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_toregion(rdata, &sr);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein /*
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Algorithm.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein */
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson n = uint8_fromregion(&sr);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_consume(&sr, 1);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson snprintf(buf, sizeof(buf), "%u ", n);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson RETERR(str_totext(buf, target));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein /*
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Digest type.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein */
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein n = uint8_fromregion(&sr);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson isc_region_consume(&sr, 1);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein snprintf(buf, sizeof(buf), "%u", n);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson RETERR(str_totext(buf, target));
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein /*
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Digest.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein */
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETERR(str_totext(" (", target));
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson RETERR(str_totext(tctx->linebreak, target));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if (tctx->width == 0) /* No splitting */
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson RETERR(isc_hex_totext(&sr, 0, "", target));
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson else
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETERR(isc_hex_totext(&sr, tctx->width - 2,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein tctx->linebreak, target));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RETERR(str_totext(" )", target));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (ISC_R_SUCCESS);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonstatic inline isc_result_t
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfromwire_sshfp(ARGS_FROMWIRE) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_t sr;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(type == dns_rdatatype_sshfp);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(type);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson UNUSED(rdclass);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson UNUSED(dctx);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(options);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_buffer_activeregion(source, &sr);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson if (sr.length < 4)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (ISC_R_UNEXPECTEDEND);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_buffer_forward(source, sr.length);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (mem_tobuffer(target, sr.base, sr.length));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_result_t
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeintowire_sshfp(ARGS_TOWIRE) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_t sr;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata->type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata->length != 0);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(cctx);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_toregion(rdata, &sr);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (mem_tobuffer(target, sr.base, sr.length));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
821350367e2c7313c02eb275e8e05d5193b47cfdJeremy C. Reed
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline int
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeincompare_sshfp(ARGS_COMPARE) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_t r1;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_t r2;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata1->type == rdata2->type);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata1->rdclass == rdata2->rdclass);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata1->type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata1->length != 0);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata2->length != 0);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson dns_rdata_toregion(rdata1, &r1);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_toregion(rdata2, &r2);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (isc_region_compare(&r1, &r2));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_result_t
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinfromstruct_sshfp(ARGS_FROMSTRUCT) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_sshfp_t *sshfp = source;
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson REQUIRE(type == dns_rdatatype_sshfp);
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson REQUIRE(source != NULL);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson REQUIRE(sshfp->common.rdtype == type);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(sshfp->common.rdclass == rdclass);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(type);
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson UNUSED(rdclass);
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson RETERR(uint8_tobuffer(sshfp->algorithm, target));
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson RETERR(uint8_tobuffer(sshfp->digest_type, target));
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (mem_tobuffer(target, sshfp->digest, sshfp->length));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_result_t
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeintostruct_sshfp(ARGS_TOSTRUCT) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_sshfp_t *sshfp = target;
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson isc_region_t region;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata->type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(target != NULL);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata->length != 0);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sshfp->common.rdclass = rdata->rdclass;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sshfp->common.rdtype = rdata->type;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ISC_LINK_INIT(&sshfp->common, link);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_toregion(rdata, &region);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sshfp->algorithm = uint8_fromregion(&region);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_consume(&region, 1);
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson sshfp->digest_type = uint8_fromregion(&region);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_consume(&region, 1);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sshfp->length = region.length;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sshfp->digest = mem_maybedup(mctx, region.base, region.length);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if (sshfp->digest == NULL)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (ISC_R_NOMEMORY);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sshfp->mctx = mctx;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (ISC_R_SUCCESS);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline void
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfreestruct_sshfp(ARGS_FREESTRUCT) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_sshfp_t *sshfp = source;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(sshfp != NULL);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(sshfp->common.rdtype == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if (sshfp->mctx == NULL)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return;
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if (sshfp->digest != NULL)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_mem_free(sshfp->mctx, sshfp->digest);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sshfp->mctx = NULL;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_result_t
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonadditionaldata_sshfp(ARGS_ADDLDATA) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata->type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(rdata);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(add);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(arg);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (ISC_R_SUCCESS);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_result_t
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeindigest_sshfp(ARGS_DIGEST) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein isc_region_t r;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata->type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dns_rdata_toregion(rdata, &r);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return ((digest)(arg, &r));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_boolean_t
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeincheckowner_sshfp(ARGS_CHECKOWNER) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(name);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(type);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(rdclass);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(wildcard);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (ISC_TRUE);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstatic inline isc_boolean_t
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinchecknames_sshfp(ARGS_CHECKNAMES) {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein REQUIRE(rdata->type == dns_rdatatype_sshfp);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(rdata);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(owner);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein UNUSED(bad);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein return (ISC_TRUE);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
static inline int
casecompare_sshfp(ARGS_COMPARE) {
return (compare_sshfp(rdata1, rdata2));
}
#endif /* RDATA_GENERIC_SSHFP_44_C */