mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 19:25:56 +03:00
[PR #3158] [MERGED] Intermediate access to the current time via traits #3602
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#3602
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/3158
Author: @divergentdave
Created: 7/25/2025
Status: ✅ Merged
Merged: 8/20/2025
Merged by: @divergentdave
Base:
main← Head:david/verification-time-trait📝 Commits (9)
47a90c8Hoist getting current time to verify_rrsets()e38bda2Hoist getting current time to verify_response()768becdAdd Time trait method for current Unix timestamp36165b3Use Time trait during DNSSEC verification0ef1e2fUse Time trait when signing requests9e95492Add runtime generic parameter to SqliteAuthority4ba7a42Use Time trait during TSIG verification64bdf30Add runtime generic parameter to InMemoryAuthority7b5ede6Use Time trait during zone signing📊 Changes
16 files changed (+153 additions, -108 deletions)
View changed files
📝
bin/src/lib.rs(+13 -12)📝
bin/tests/integration/in_memory.rs(+5 -2)📝
bin/tests/integration/txt_tests.rs(+5 -4)📝
crates/proto/src/dnssec/handle.rs(+18 -20)📝
crates/proto/src/runtime.rs(+11 -0)📝
crates/proto/src/udp/udp_client_stream.rs(+1 -6)📝
crates/proto/src/xfer/dns_multiplexer.rs(+2 -10)📝
crates/server/src/store/in_memory/inner.rs(+10 -5)📝
crates/server/src/store/in_memory/mod.rs(+52 -20)📝
crates/server/src/store/sqlite/mod.rs(+24 -22)📝
tests/integration-tests/tests/integration/client_future_tests.rs(+2 -1)📝
tests/integration-tests/tests/integration/client_tests.rs(+2 -1)📝
tests/integration-tests/tests/integration/rfc4592_tests.rs(+1 -1)📝
tests/integration-tests/tests/integration/sqlite_authority_tests.rs(+5 -2)📝
tests/integration-tests/tests/integration/truncation_tests.rs(+1 -1)📝
tests/integration-tests/tests/integration/validating_forwarder_tests.rs(+1 -1)📄 Description
This replaces all calls to
SystemTime::now()andOffsetDateTime::now_utc()with a new method on theTimetrait, which is accessible from runtime providers and connection providers. This affects DNSSEC signing, DNSSEC verification, message signing, and message verification. This will give us more flexibility when writing tests for these features. For example, we could store entire responses and verify them with a fixed value for the current time.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.