summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-02-24 17:45:25 +0000
committerflorian <florian@openbsd.org>2020-02-24 17:45:25 +0000
commitee21177a5b213b2a5b2979caf32f5a2642ca4f1c (patch)
treef5e22756492bb51ddc1553c225d9a61efcf89a67 /usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c
parentWe only need to fill a wire format buffer from soa and tsig structs. (diff)
downloadwireguard-openbsd-ee21177a5b213b2a5b2979caf32f5a2642ca4f1c.tar.xz
wireguard-openbsd-ee21177a5b213b2a5b2979caf32f5a2642ca4f1c.zip
We only need to create cname, ns, soa and tsig structs.
OK jsg
Diffstat (limited to 'usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c')
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c b/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c
index 069155c8ff6..ed6bd262ee5 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sshfp_44.c,v 1.7 2020/02/24 17:44:45 florian Exp $ */
+/* $Id: sshfp_44.c,v 1.8 2020/02/24 17:45:26 florian Exp $ */
/* RFC 4255 */
@@ -102,33 +102,6 @@ towire_sshfp(ARGS_TOWIRE) {
-static inline isc_result_t
-tostruct_sshfp(ARGS_TOSTRUCT) {
- dns_rdata_sshfp_t *sshfp = target;
- isc_region_t region;
-
- REQUIRE(rdata->type == dns_rdatatype_sshfp);
- REQUIRE(target != NULL);
- REQUIRE(rdata->length != 0);
-
- sshfp->common.rdclass = rdata->rdclass;
- sshfp->common.rdtype = rdata->type;
- ISC_LINK_INIT(&sshfp->common, link);
-
- dns_rdata_toregion(rdata, &region);
-
- sshfp->algorithm = uint8_fromregion(&region);
- isc_region_consume(&region, 1);
- sshfp->digest_type = uint8_fromregion(&region);
- isc_region_consume(&region, 1);
- sshfp->length = region.length;
-
- sshfp->digest = mem_maybedup(region.base, region.length);
- if (sshfp->digest == NULL)
- return (ISC_R_NOMEMORY);
-
- return (ISC_R_SUCCESS);
-}