Lines Matching defs:tsig

353 	dns_rdata_any_tsig_t *tsig = source;
359 REQUIRE(tsig->common.rdclass == rdclass);
360 REQUIRE(tsig->common.rdtype == type);
368 RETERR(name_tobuffer(&tsig->algorithm, target));
377 RETERR(uint16_tobuffer((isc_uint16_t)(tsig->timesigned >> 32),
379 RETERR(uint32_tobuffer((isc_uint32_t)(tsig->timesigned & 0xffffffffU),
385 RETERR(uint16_tobuffer(tsig->fudge, target));
390 RETERR(uint16_tobuffer(tsig->siglen, target));
395 RETERR(mem_tobuffer(target, tsig->signature, tsig->siglen));
404 RETERR(uint16_tobuffer(tsig->originalid, target));
409 RETERR(uint16_tobuffer(tsig->error, target));
414 RETERR(uint16_tobuffer(tsig->otherlen, target));
419 return (mem_tobuffer(target, tsig->other, tsig->otherlen));
424 dns_rdata_any_tsig_t *tsig;
432 tsig = (dns_rdata_any_tsig_t *) target;
433 tsig->common.rdclass = rdata->rdclass;
434 tsig->common.rdtype = rdata->type;
435 ISC_LINK_INIT(&tsig->common, link);
444 dns_name_init(&tsig->algorithm, NULL);
445 RETERR(name_duporclone(&alg, mctx, &tsig->algorithm));
447 isc_region_consume(&sr, name_length(&tsig->algorithm));
453 tsig->timesigned = ((isc_uint64_t)sr.base[0] << 40) |
464 tsig->fudge = uint16_fromregion(&sr);
470 tsig->siglen = uint16_fromregion(&sr);
476 INSIST(sr.length >= tsig->siglen);
477 tsig->signature = mem_maybedup(mctx, sr.base, tsig->siglen);
478 if (tsig->signature == NULL)
480 isc_region_consume(&sr, tsig->siglen);
485 tsig->originalid = uint16_fromregion(&sr);
491 tsig->error = uint16_fromregion(&sr);
497 tsig->otherlen = uint16_fromregion(&sr);
503 INSIST(sr.length == tsig->otherlen);
504 tsig->other = mem_maybedup(mctx, sr.base, tsig->otherlen);
505 if (tsig->other == NULL)
508 tsig->mctx = mctx;
513 dns_name_free(&tsig->algorithm, tsig->mctx);
514 if (mctx != NULL && tsig->signature != NULL)
515 isc_mem_free(mctx, tsig->signature);
521 dns_rdata_any_tsig_t *tsig = (dns_rdata_any_tsig_t *) source;
524 REQUIRE(tsig->common.rdtype == dns_rdatatype_tsig);
525 REQUIRE(tsig->common.rdclass == dns_rdataclass_any);
527 if (tsig->mctx == NULL)
530 dns_name_free(&tsig->algorithm, tsig->mctx);
531 if (tsig->signature != NULL)
532 isc_mem_free(tsig->mctx, tsig->signature);
533 if (tsig->other != NULL)
534 isc_mem_free(tsig->mctx, tsig->other);
535 tsig->mctx = NULL;