mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-11 21:12:15 +00:00
19 lines
560 B
Rust
19 lines
560 B
Rust
use libunbound::*;
|
|
use trust_dns_proto::rr::record_type::RecordType;
|
|
use trust_dns_proto::rr::DNSClass;
|
|
|
|
fn main() {
|
|
let ctx = Context::new().expect("Context to be created");
|
|
ctx.bootstrap_trust_anchor_file("/tmp/root.dnssec.anchor")
|
|
.unwrap();
|
|
/* alternatively, if you don't want to touch local files:
|
|
for a in ROOT_TRUST_ANCHORS {
|
|
ctx.add_trust_anchor(a).unwrap();
|
|
}
|
|
*/
|
|
let result = ctx
|
|
.resolve("_25._tcp.do.havedane.net", RecordType::TLSA, DNSClass::IN)
|
|
.unwrap();
|
|
println!("{result:#?}");
|
|
}
|