[PR #2318] [MERGED] Use SerialNumber type for signature timestamps #2947

Closed
opened 2026-03-16 11:16:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2318
Author: @justahero
Created: 7/23/2024
Status: Merged
Merged: 7/31/2024
Merged by: @djc

Base: mainHead: sz-serial-number-arithmetic


📝 Commits (6)

  • 549cf71 Compare timestamps using Serial Number Arithmetics
  • 90625df conformance: Add assertion
  • a195202 conformance: Refactor passing of signature timestamps
  • f2dbfdf conformance: Adds tests to check timestamp boundaries
  • a968dcc Change signature timestamp fields to SerialNumber
  • 44233d4 Change visibility of inner NewType value

📊 Changes

9 files changed (+180 additions, -29 deletions)

View changed files

📝 conformance/packages/conformance-tests/src/resolver/dnssec/rfc4035/section_5/section_5_3.rs (+72 -1)
📝 conformance/packages/dns-test/src/zone_file/signer.rs (+12 -6)
📝 crates/proto/src/rr/dnssec/rdata/rrsig.rs (+1 -1)
📝 crates/proto/src/rr/dnssec/rdata/sig.rs (+22 -12)
📝 crates/proto/src/rr/dnssec/tbs.rs (+3 -3)
📝 crates/proto/src/rr/mod.rs (+2 -0)
crates/proto/src/rr/serial_number.rs (+56 -0)
📝 crates/proto/src/xfer/dnssec_dns_handle.rs (+8 -4)
📝 crates/server/src/store/in_memory/authority.rs (+4 -2)

📄 Description

This PR adds the SerialNumber NewType to support Serial Number Arithmetics as defined in RFC 1982. The RRSIG signature timestamps inception & expiration apply arithmetics for comparisons (see RFC 4034, Section 3.1.5).

Closes #2312


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2318 **Author:** [@justahero](https://github.com/justahero) **Created:** 7/23/2024 **Status:** ✅ Merged **Merged:** 7/31/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `sz-serial-number-arithmetic` --- ### 📝 Commits (6) - [`549cf71`](https://github.com/hickory-dns/hickory-dns/commit/549cf7185ca92e7483b359be16b149b9231823ab) Compare timestamps using Serial Number Arithmetics - [`90625df`](https://github.com/hickory-dns/hickory-dns/commit/90625df82d388dce28dd14204edd3bc4d721e605) conformance: Add assertion - [`a195202`](https://github.com/hickory-dns/hickory-dns/commit/a195202d47f615cb8d879ae0caf0f711b0d1d01e) conformance: Refactor passing of signature timestamps - [`f2dbfdf`](https://github.com/hickory-dns/hickory-dns/commit/f2dbfdfef562507ff184d2bfee22f9654ca341ee) conformance: Adds tests to check timestamp boundaries - [`a968dcc`](https://github.com/hickory-dns/hickory-dns/commit/a968dcc501c03a8538b350c303fba894215f51af) Change signature timestamp fields to SerialNumber - [`44233d4`](https://github.com/hickory-dns/hickory-dns/commit/44233d46d1af4ff59c42bf266e573361fdf0a41d) Change visibility of inner NewType value ### 📊 Changes **9 files changed** (+180 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `conformance/packages/conformance-tests/src/resolver/dnssec/rfc4035/section_5/section_5_3.rs` (+72 -1) 📝 `conformance/packages/dns-test/src/zone_file/signer.rs` (+12 -6) 📝 `crates/proto/src/rr/dnssec/rdata/rrsig.rs` (+1 -1) 📝 `crates/proto/src/rr/dnssec/rdata/sig.rs` (+22 -12) 📝 `crates/proto/src/rr/dnssec/tbs.rs` (+3 -3) 📝 `crates/proto/src/rr/mod.rs` (+2 -0) ➕ `crates/proto/src/rr/serial_number.rs` (+56 -0) 📝 `crates/proto/src/xfer/dnssec_dns_handle.rs` (+8 -4) 📝 `crates/server/src/store/in_memory/authority.rs` (+4 -2) </details> ### 📄 Description This PR adds the `SerialNumber` NewType to support Serial Number Arithmetics as defined in [RFC 1982](https://www.rfc-editor.org/rfc/rfc1982). The RRSIG signature timestamps `inception` & `expiration` apply arithmetics for comparisons (see [RFC 4034, Section 3.1.5](https://datatracker.ietf.org/doc/html/rfc4034#section-3.1.5)). Closes #2312 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:16:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2947
No description provided.