Lines Matching defs:keydata
9 /* $Id: keydata.c,v 1.3 2009/07/01 23:47:36 tbox Exp $ */
23 #include <dns/keydata.h>
26 dns_keydata_todnskey(dns_rdata_keydata_t *keydata,
29 REQUIRE(keydata != NULL && dnskey != NULL);
32 dnskey->common.rdclass = keydata->common.rdclass;
34 dnskey->flags = keydata->flags;
35 dnskey->protocol = keydata->protocol;
36 dnskey->algorithm = keydata->algorithm;
38 dnskey->datalen = keydata->datalen;
41 dnskey->data = keydata->data;
46 memmove(dnskey->data, keydata->data, dnskey->datalen);
53 dns_keydata_fromdnskey(dns_rdata_keydata_t *keydata,
58 REQUIRE(keydata != NULL && dnskey != NULL);
60 keydata->common.rdtype = dns_rdatatype_keydata;
61 keydata->common.rdclass = dnskey->common.rdclass;
62 keydata->mctx = mctx;
63 keydata->refresh = refresh;
64 keydata->addhd = addhd;
65 keydata->removehd = removehd;
66 keydata->flags = dnskey->flags;
67 keydata->protocol = dnskey->protocol;
68 keydata->algorithm = dnskey->algorithm;
70 keydata->datalen = dnskey->datalen;
72 keydata->data = dnskey->data;
74 keydata->data = isc_mem_allocate(mctx, keydata->datalen);
75 if (keydata->data == NULL)
77 memmove(keydata->data, dnskey->data, keydata->datalen);