Lines Matching defs:tsig
355 dns_rdata_any_tsig_t *tsig = source;
361 REQUIRE(tsig->common.rdclass == rdclass);
362 REQUIRE(tsig->common.rdtype == type);
370 RETERR(name_tobuffer(&tsig->algorithm, target));
379 RETERR(uint16_tobuffer((isc_uint16_t)(tsig->timesigned >> 32),
381 RETERR(uint32_tobuffer((isc_uint32_t)(tsig->timesigned & 0xffffffffU),
387 RETERR(uint16_tobuffer(tsig->fudge, target));
392 RETERR(uint16_tobuffer(tsig->siglen, target));
397 RETERR(mem_tobuffer(target, tsig->signature, tsig->siglen));
406 RETERR(uint16_tobuffer(tsig->originalid, target));
411 RETERR(uint16_tobuffer(tsig->error, target));
416 RETERR(uint16_tobuffer(tsig->otherlen, target));
421 return (mem_tobuffer(target, tsig->other, tsig->otherlen));
426 dns_rdata_any_tsig_t *tsig;
434 tsig = (dns_rdata_any_tsig_t *) target;
435 tsig->common.rdclass = rdata->rdclass;
436 tsig->common.rdtype = rdata->type;
437 ISC_LINK_INIT(&tsig->common, link);
446 dns_name_init(&tsig->algorithm, NULL);
447 RETERR(name_duporclone(&alg, mctx, &tsig->algorithm));
449 isc_region_consume(&sr, name_length(&tsig->algorithm));
455 tsig->timesigned = ((isc_uint64_t)sr.base[0] << 40) |
466 tsig->fudge = uint16_fromregion(&sr);
472 tsig->siglen = uint16_fromregion(&sr);
478 INSIST(sr.length >= tsig->siglen);
479 tsig->signature = mem_maybedup(mctx, sr.base, tsig->siglen);
480 if (tsig->signature == NULL)
482 isc_region_consume(&sr, tsig->siglen);
487 tsig->originalid = uint16_fromregion(&sr);
493 tsig->error = uint16_fromregion(&sr);
499 tsig->otherlen = uint16_fromregion(&sr);
505 INSIST(sr.length == tsig->otherlen);
506 tsig->other = mem_maybedup(mctx, sr.base, tsig->otherlen);
507 if (tsig->other == NULL)
510 tsig->mctx = mctx;
515 dns_name_free(&tsig->algorithm, tsig->mctx);
516 if (mctx != NULL && tsig->signature != NULL)
517 isc_mem_free(mctx, tsig->signature);
523 dns_rdata_any_tsig_t *tsig = (dns_rdata_any_tsig_t *) source;
526 REQUIRE(tsig->common.rdclass == 255);
527 REQUIRE(tsig->common.rdtype == 250);
529 if (tsig->mctx == NULL)
532 dns_name_free(&tsig->algorithm, tsig->mctx);
533 if (tsig->signature != NULL)
534 isc_mem_free(tsig->mctx, tsig->signature);
535 if (tsig->other != NULL)
536 isc_mem_free(tsig->mctx, tsig->other);
537 tsig->mctx = NULL;