X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fquery.rs;h=bb724020ea98f792f1631ca20d89616415d9aa75;hb=1d725ca4a022415c85072bc763d50738df863d6d;hp=4fca659cfb7ae8fb84da12ab60b76c1d5257ff5d;hpb=8b7a06506752a2456e7ce513db49058a6deaad0c;p=dnssec-prover diff --git a/src/query.rs b/src/query.rs index 4fca659..bb72402 100644 --- a/src/query.rs +++ b/src/query.rs @@ -138,7 +138,7 @@ fn handle_response(resp: &[u8], proof: &mut Vec, rrsig_key_names: &mut Vec, rrsig_key_names: &mut Vec, rrsig_key_names: &mut Vec { + if rrsig.ty != NSec::TYPE && rrsig.ty != NSec3::TYPE { + continue; + } + }, + RR::NSec(_)|RR::NSec3(_) => {}, + _ => continue, + } + write_rr(&rr, ttl, proof); + min_ttl = cmp::min(min_ttl, ttl); + if let RR::RRSig(rrsig) = rr { rrsig_key_names.push(rrsig.key_name); } + } + Ok(min_ttl) } @@ -188,6 +207,7 @@ const MAX_REQUESTS: usize = 10; /// make a query to `https://doh-server/endpoint?dns=base64url_encoded_query` with an `Accept` /// header of `application/dns-message`. Each response, in raw binary, can be fed directly into /// [`ProofBuilder::process_response`]. +#[derive(Clone)] pub struct ProofBuilder { proof: Vec, min_ttl: u32,