Commit c07d9c69 authored by Lubos Slovak's avatar Lubos Slovak

Storing previous digest when validating TSIG

refs #1362 @10m
parent c4c63a3e
......@@ -357,10 +357,13 @@ static int xfrin_check_tsig(knot_packet_t *packet, knot_ns_xfr_t *xfr,
// and reset the counter and data storage
xfr->packet_nr = 1;
xfr->tsig_data_size = 0;
// and save the new previous digest
/*! \todo Extract the digest from the TSIG RDATA and
* store it.
*/
// Extract the digest from the TSIG RDATA and store it.
xfr->prev_digest = tsig_rdata_mac(tsig);
// the size should still be the same
/*! \todo Enable assert when API is complete. */
// assert(xfr->prev_digest_size ==
// tsig_alg_digest_length(tsig_rdata_alg(tsig)));
} else { // TSIG not required and not there
// just append the wireformat to the TSIG data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment