mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 19:25:56 +03:00
[PR #3184] [MERGED] add server SSLKEYLOGFILE support, extend dns-test TShark features #3624
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#3624
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/3184
Author: @cpu
Created: 8/7/2025
Status: ✅ Merged
Merged: 8/11/2025
Merged by: @cpu
Base:
main← Head:cpu-dot-pcap_dev📝 Commits (5)
56687dbserver: optionally support SSLKEYLOGFILEe693050dns-test: support tshark w/ TCP DNS trafficf960735dns-test: support TShark capturing DoT traffic86270fedns-test: capture TShark protocol and src/dest port84ac03bdns-test: support multiple TShark filters📊 Changes
21 files changed (+369 additions, -50 deletions)
View changed files
📝
bin/src/hickory-dns.rs(+7 -1)📝
bin/src/lib.rs(+20 -0)📝
conformance/packages/conformance-tests/src/resolver/dns/scenarios.rs(+5 -2)📝
conformance/packages/conformance-tests/src/resolver/dnssec/regression.rs(+6 -3)📝
conformance/packages/conformance-tests/src/resolver/dnssec/rfc4035/section_3/section_3_1/section_3_1_4.rs(+2 -1)📝
conformance/packages/conformance-tests/src/resolver/dnssec/rfc4035/section_3/section_3_2.rs(+10 -4)📝
conformance/packages/conformance-tests/src/resolver/dnssec/rfc4035/section_4/section_4_1.rs(+5 -2)📝
conformance/packages/conformance-tests/src/resolver/dnssec/rfc4035/section_4/section_4_5.rs(+3 -3)📝
conformance/packages/conformance-tests/src/resolver/dnssec/rfc4035/section_4/section_4_6.rs(+5 -2)📝
conformance/packages/conformance-tests/src/resolver/dnssec/scenarios/secure.rs(+2 -2)📝
conformance/packages/dns-test/src/docker/hickory.Dockerfile(+1 -0)📝
conformance/packages/dns-test/src/name_server.rs(+1 -1)📝
conformance/packages/dns-test/src/resolver.rs(+1 -1)📝
conformance/packages/dns-test/src/templates/hickory.name-server.toml.jinja(+1 -0)📝
conformance/packages/dns-test/src/tshark.rs(+257 -18)📝
crates/server/src/server/h2_handler.rs(+6 -1)📝
crates/server/src/server/mod.rs(+17 -2)📝
tests/e2e-tests/src/resolver/dnssec/regression.rs(+1 -1)📝
tests/e2e-tests/src/resolver/do_not_query.rs(+13 -4)📝
tests/integration-tests/tests/integration/server_future_tests.rs(+1 -2)...and 1 more files
📄 Description
Updates the
hickory-dnsbinary with a new TLS-feature specific config field,ssl_keylog_enabled. When true, and theSSLKEYLOGFILEenv var is set, TLS session key data will be written to the specified file in a format compatible with Wireshark. Since this breaks forward secrecy and must be used with care in test/debugging contexts only, it's disabled by default. Thedns-testconformance docker image for Hickory is updated to enable it, writing the secrets to a fixed location for use in testing. Under the hood, the underlyingservercrate is updated to respect aboolargument when constructing default TLS server configs for whether or not to enableSSLKEYLOGFILEsupport.Next, the
TSharkhelper from thedns-testpackage is updated to extend its capture support. Previously it was hardcoded to only capture plaintext DNS over UDP port 53. This branch introduces a builder type that allows customizing this to capture plaintext DNS over TCP, as well as encrypted DNS using DoT (w/ theSSLKEYLOGFILEsupport mentioned above so the inner decoded DNS messages can be surfaced). Multiple protocol filters can be combined (using a logical OR) so that it's possible to capture both plaintext and encrypted DNS messages, for example (and to determine which protocol/ports were associated with each captured message).These capabilities are groundwork for being able to write more interesting tests that verify opportunistic encryption between a resovler and an auth. server works as expected, with the protocol/ports in use for queries changing based on probe results/server capabilities.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.