mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #2975] [MERGED] Further TSIG related cleanups #3464
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#3464
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/2975
Author: @cpu
Created: 5/6/2025
Status: ✅ Merged
Merged: 5/6/2025
Merged by: @djc
Base:
main← Head:cpu-tsig-msg-read_dev📝 Commits (10+)
2af3a37proto: doc signed_bitmessage_to_buf first_message arg315e2caproto: split signed_bitmessage_to_buf Message::read_records8dd62b4proto: refactor/tidy signed_bitmessage_to_bufd7c1870proto: clarify TSIG message_tbs rustdoc47b1c86proto: remove superfluous TSIG message_tbs type annotations9d0d3f5proto: remove TSIG message_tbs previous message argb5be2cdproto: flip message/previous_hash order for TSIG fns4a403e7proto: clarify TSIG verify_message_byte rustdoc6948959proto: flip verify_message_byte range/ts return arg order4604805proto: adjust TSIG RFC comments📊 Changes
11 files changed (+187 additions, -163 deletions)
View changed files
📝
bin/tests/integration/named_metrics_tests.rs(+2 -2)📝
crates/client/src/client/client.rs(+3 -3)📝
crates/proto/src/dnssec/rdata/tsig.rs(+50 -46)📝
crates/proto/src/dnssec/signer.rs(+5 -5)📝
crates/proto/src/dnssec/tsig.rs(+56 -59)📝
crates/proto/src/op/message.rs(+54 -29)📝
crates/proto/src/op/mod.rs(+1 -3)📝
crates/proto/src/udp/udp_client_stream.rs(+6 -6)📝
crates/proto/src/xfer/dns_multiplexer.rs(+6 -6)📝
tests/compatibility-tests/tests/integration/tsig_tests.rs(+2 -2)📝
tests/integration-tests/tests/integration/client_tests.rs(+2 -2)📄 Description
This is a follow-up to https://github.com/hickory-dns/hickory-dns/pull/2964
Outside of documentation cleanups, there were a couple more meaningful changes;
signed_bitmessage_to_buf()fn was reworked to lean more heavily onMessage::read_records(), and to correctly specifyis_additional. This in turn allows makingMessage::read_records()enforce thatOPTrecords are only found in the additional section (See this comment thread for more information).message_tbs()fn loses itsprevious_hashargument; it was dead code as there's no use-case where we need to consider a previous message digest when signing a message.MessageFinalizertrait was overly generic, supporting adding any number ofRecords to the end of a to-be-finalizedMessage. In practice there are only two meaningful implementations: TSIG and SIG(0). In these cases the only thing we want to do is append a singleMessageSignature, so let's make the trait support that specifically. This is less general/flexible, but I don't think other use-cases exist to justify the flexibility.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.