Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSEC3 and multiple key signing support. #416

Open
wants to merge 386 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 209 commits
Commits
Show all changes
386 commits
Select commit Hold shift + click to select a range
2a1489f
[workflows/ci] Use 'vcpkg' instead of vendoring OpenSSL
bal-e Oct 9, 2024
e8d208f
Ensure 'openssl' dep exposes necessary interfaces
bal-e Oct 9, 2024
045d52b
[workflows/ci] Record location of 'vcpkg'
bal-e Oct 9, 2024
460679b
[workflows/ci] Use a YAML def for 'VCPKG_ROOT'
bal-e Oct 9, 2024
21ba8d3
[workflows/ci] Fix a vcpkg triplet to use
bal-e Oct 9, 2024
4195dd4
Upgrade openssl to 0.10.57 for bitflags 2.x
bal-e Oct 9, 2024
4f4f6ff
[workflows/ci] Use dynamic linking for vcpkg openssl
bal-e Oct 9, 2024
608cbea
[workflows/ci] Correctly annotate 'vcpkg'
bal-e Oct 9, 2024
632c1b0
[sign/openssl] Implement exporting public keys
bal-e Oct 9, 2024
4350d8b
[sign/ring] Implement exporting public keys
bal-e Oct 9, 2024
4c46552
[sign/generic] Test (de)serialization for generic secret keys
bal-e Oct 9, 2024
fc95523
[sign] Thoroughly test import/export in both backends
bal-e Oct 9, 2024
22e00a6
[sign] Remove debugging code and satisfy clippy
bal-e Oct 9, 2024
94b3e47
[sign] Account for CR LF in tests
bal-e Oct 9, 2024
68a5656
[sign/openssl] Fix bugs in the signing procedure
bal-e Oct 11, 2024
a71c339
Refactor the 'sign' module
bal-e Oct 15, 2024
824c8e3
Move 'sign' and 'validate' to unstable feature gates
bal-e Oct 16, 2024
6d8c29e
[workflows/ci] Document the vcpkg env vars
bal-e Oct 16, 2024
82a05aa
Rename public/secret key interfaces to '*Raw*'
bal-e Oct 16, 2024
980fe5a
[sign/ring] Store the RNG in an 'Arc'
bal-e Oct 16, 2024
35ff06c
[validate] Enhance 'Signature' API
bal-e Oct 16, 2024
95cc462
[validate] Add high-level 'Key' type
bal-e Oct 16, 2024
3cec8cb
[sign/openssl] Pad ECDSA keys when exporting
bal-e Oct 16, 2024
8682b6d
[validate] Implement 'Key::key_tag()'
bal-e Oct 16, 2024
57d20d9
[validate] Correct bit offsets for flags
bal-e Oct 16, 2024
f37c862
[validate] Implement support for digests
bal-e Oct 16, 2024
7f01a5f
[validate] Enhance BIND format conversion for 'Key'
bal-e Oct 18, 2024
b4103a3
[sign] Introduce 'SigningKey'
bal-e Oct 20, 2024
81720c3
[sign] Handle errors more responsibly
bal-e Oct 21, 2024
1e00479
[sign] correct doc link
bal-e Oct 21, 2024
d26a433
[sign/openssl] Replace panics with results
bal-e Oct 23, 2024
6968cb9
remove 'sign/key'
bal-e Oct 23, 2024
99cb9ef
[sign] Introduce 'common' for abstracting backends
bal-e Oct 24, 2024
8321d50
[sign/generic] add top-level doc comment
bal-e Oct 24, 2024
a25be56
[validate] debug bind format errors
bal-e Oct 24, 2024
59650a4
[validate] more debug statements
bal-e Oct 24, 2024
0f54a8d
[validate] format DNSKEYs using 'ZonefileFmt'
bal-e Oct 24, 2024
5a3de59
Reorganize crate features in 'Cargo.toml'
bal-e Oct 25, 2024
12a70af
[sign] Add key generation support for Ring
bal-e Oct 25, 2024
2f2fb58
[sign] Make OpenSSL support optional
bal-e Oct 25, 2024
e0d68ca
FIX: DNSKEY RRs must also be canonically ordered before signing.
ximon18 Oct 28, 2024
60cff58
Extend test file with records useful for manual testing of NSEC3.
ximon18 Oct 28, 2024
735712c
Merge branch 'dnssec-key' into initial-nsec3-generation
ximon18 Oct 28, 2024
a4316b5
[sign] Rename 'generic::SecretKey' to 'KeyBytes'
bal-e Oct 29, 2024
e0a4fc0
[sign] Rename 'SecretKey' to 'KeyPair' in all impls
bal-e Oct 29, 2024
31462cc
Merge branch 'main' into dnssec-key
bal-e Oct 29, 2024
eb2ac06
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Oct 29, 2024
eaea464
Merge fixes missed from the last commit.
ximon18 Oct 29, 2024
4447cc6
Merge branch 'dnssec-key' into initial-nsec3-generation
ximon18 Oct 29, 2024
5200cfa
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Oct 29, 2024
48e178a
[sign] Rename 'KeyBytes' to 'SecretKeyBytes'
bal-e Oct 29, 2024
daa96d8
[validate] Rename 'RawPublicKey' to 'PublicKeyBytes'
bal-e Oct 29, 2024
d84e2c0
Merge branch 'dnssec-key' into initial-nsec3-generation
ximon18 Oct 29, 2024
438af22
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Oct 29, 2024
221f163
[sign/ring] Remove redundant imports
bal-e Oct 29, 2024
02c625b
Merge branch 'dnssec-key' into initial-nsec3-generation
ximon18 Oct 29, 2024
6f992d8
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Oct 29, 2024
6d3a602
Clippy.
ximon18 Oct 29, 2024
61bc3aa
[sign,validate] Add 'display_as_bind()' to key bytes types
bal-e Oct 30, 2024
55716a4
[sign,validate] remove unused imports
bal-e Oct 30, 2024
f6c8c7e
Emulate ldns-signzone -p behaviour: set NSEC3 opt-out flag but includ…
ximon18 Oct 30, 2024
8bf2c9f
Move nsec3_hash() back into the validator module per review feedback.
ximon18 Oct 30, 2024
beb8e52
Move nsec3_hash() to the validate (not validator!) module per review …
ximon18 Oct 30, 2024
7831260
[sign] Document everything
bal-e Oct 31, 2024
a04c917
Extend test file with records useful for manual testing of NSEC3.
ximon18 Oct 28, 2024
abaab27
Revert "Extend test file with records useful for manual testing of NS…
ximon18 Oct 31, 2024
7a6ec53
Review feedback.
ximon18 Oct 31, 2024
d59eab9
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Oct 31, 2024
3c53e9e
Review feedback.
ximon18 Oct 31, 2024
50433f0
Review feedback.
ximon18 Oct 31, 2024
890cd30
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Oct 31, 2024
70e998a
Review feedback inspired change (though not actually what was suggest…
ximon18 Oct 31, 2024
cefb5c1
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Oct 31, 2024
de7c13f
Add a note to self about tests to add.
ximon18 Nov 1, 2024
7e9977e
More ENT NSEC3 cases to handle.
ximon18 Nov 1, 2024
89a18b8
Merge branch 'dnssec-key' into initial-nsec3-generation
ximon18 Nov 2, 2024
443fc1d
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Nov 2, 2024
7c9ee4c
[lib] Rewrite feature flag documentation
bal-e Nov 4, 2024
cea9ae3
[workflows/ci] Use 'apt-get' instead of 'apt'
bal-e Nov 4, 2024
354bf0a
[sign] Clarify documentation as per @ximon18
bal-e Nov 4, 2024
ca10361
[sign] Use 'secrecy' to protect private keys
bal-e Nov 4, 2024
9268dd3
Display NSEC3 without trailing space if the bitmap is empty.
ximon18 Nov 4, 2024
fb7e9ef
Backport NSEC3 improvements and upstream dnssec-key branch compatibil…
ximon18 Nov 4, 2024
414ea6c
[sign,validate] Add 'display_as_bind()' to key bytes types
bal-e Oct 30, 2024
2bde7aa
[sign,validate] remove unused imports
bal-e Oct 30, 2024
98db88b
[sign] Document everything
bal-e Oct 31, 2024
8877c22
Update to work with changes in the upstream dnssec-key branch using a…
ximon18 Nov 4, 2024
40d65ac
Minor tweaks.
ximon18 Nov 4, 2024
c0fc11b
Merge branch 'dnssec-key' into initial-nsec3-generation
ximon18 Nov 4, 2024
b2158ab
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Nov 4, 2024
bdeddde
Add some Arbitrary impls to support cargo-fuzz based fuzz testing.
ximon18 Nov 6, 2024
f2cabc3
Impl Display for Nsec3HashError.
ximon18 Nov 6, 2024
109370d
Cargo fmt.
ximon18 Nov 6, 2024
0c26d94
Use a writer interface for write_with_comments().
ximon18 Nov 6, 2024
588fd0f
Fix test broken by changed input file.
ximon18 Nov 6, 2024
9cad710
Add do not add used keys to zone support.
ximon18 Nov 7, 2024
06a9f0d
Add SortedRecords::replace_soa().
ximon18 Nov 7, 2024
e1c1db8
Merge branch 'main' into initial-nsec3-generation
ximon18 Nov 8, 2024
0a79594
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Nov 8, 2024
42cbd0d
Cargo format
mozzieongit Nov 20, 2024
90aae20
Implement FromStr for zonemd Scheme and Algorithm
mozzieongit Nov 20, 2024
d390d15
Use std::fmt::Write instead of std::io::Write.
ximon18 Nov 21, 2024
e591121
Proof of concept, expected to be replaced by a better impl (a) as a s…
ximon18 Nov 22, 2024
b2a2169
Cargo fmt.
ximon18 Nov 22, 2024
250b52e
Merge branch 'main' into initial-nsec3-generation
tertsdiepraam Nov 22, 2024
0830acd
Impl Clone for Family.
ximon18 Nov 22, 2024
6b84742
Merge branch 'multiple-key-signing' into support-zonefile-fmt-with-pa…
ximon18 Nov 22, 2024
19d8d88
Bring your own signing sort impl. Allows consumers to e.g. use Rayon …
ximon18 Nov 25, 2024
a3bac8d
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Nov 25, 2024
b9782c3
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Nov 25, 2024
7890d47
Add SortedRecords record deletion and rrsig replace methods
mozzieongit Nov 27, 2024
4808c70
Return bool from record removal methods
mozzieongit Nov 27, 2024
19fac46
Clippy
mozzieongit Nov 27, 2024
967c628
Breaking change: Update ZONEMD IANA types to use the iana macros to b…
ximon18 Nov 29, 2024
2712529
Merge branch 'zonemd-from-str' into sortedrecords-zonemd-remove-replace
ximon18 Nov 29, 2024
75145f5
Merge branch 'main' into multiple-key-signing
ximon18 Nov 29, 2024
d3b9b55
Merge branch 'multiple-key-signing' into sortedrecords-zonemd-remove-…
ximon18 Nov 29, 2024
ed76ca9
Revert "Merge branch 'main' into multiple-key-signing"
ximon18 Nov 29, 2024
fef3fd5
Merge branch 'main' into initial-nsec3-generation
ximon18 Nov 29, 2024
f844bb2
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Nov 29, 2024
b0d14ed
Revert "Merge branch 'multiple-key-signing' into sortedrecords-zonemd…
ximon18 Nov 29, 2024
c71434e
Revert "Merge branch 'zonemd-from-str' into sortedrecords-zonemd-remo…
ximon18 Nov 29, 2024
82e7d2d
Merge branch 'multiple-key-signing' into sortedrecords-zonemd-remove-…
ximon18 Nov 29, 2024
f1f5417
Merge branch 'main' into initial-nsec3-generation
ximon18 Nov 29, 2024
6272b89
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Nov 29, 2024
df4992f
Merge branch 'multiple-key-signing' into sortedrecords-zonemd-remove-…
ximon18 Nov 29, 2024
498970c
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Nov 29, 2024
d733a4e
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Nov 29, 2024
48d26d8
Merge PR #444 branch zonemd-from-str into this branch.
ximon18 Dec 2, 2024
5ede42e
IANA ZONEMD algorithm mnemonics are not hyphenated.
ximon18 Dec 2, 2024
a654d95
Base use of extra signing keys on a flag, not hard-coded behaviour.
ximon18 Dec 2, 2024
c4f291d
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 2, 2024
bf3f589
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 2, 2024
727b4c3
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 2, 2024
77b32e3
Clippy.
ximon18 Dec 2, 2024
1d3261d
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 2, 2024
2136e47
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 2, 2024
5e135ce
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 2, 2024
2de0e44
Add the signature validity period to SigningKey as "important metadat…
ximon18 Dec 3, 2024
685a402
- Move sign() out of SortedRecords into a new Signer type and have it…
ximon18 Dec 3, 2024
5d4c013
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 3, 2024
b10cc2e
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 3, 2024
39e1c9d
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 3, 2024
89eb673
Cargo fmt.
ximon18 Dec 3, 2024
323a14a
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 3, 2024
62f0199
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 3, 2024
af37a8e
Delete commented out code.
ximon18 Dec 3, 2024
9f70052
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 3, 2024
94b0de2
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 3, 2024
f784b9c
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 3, 2024
ab9b219
Revert tabbed output changes in preparation to use the PR #446 approa…
ximon18 Dec 3, 2024
3ce8640
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 3, 2024
7aac5ed
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 3, 2024
623f491
Adjust key usage strategy to support LDNS default behaviour of use ZS…
ximon18 Dec 5, 2024
3efb65e
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 5, 2024
9607ba0
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 5, 2024
9325956
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 5, 2024
8c2b140
Rename strategy fns to refer to what they are selecting more accurately.
ximon18 Dec 5, 2024
12c252f
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 5, 2024
e4a5bf9
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 5, 2024
b9f9b4a
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 5, 2024
ad795a9
Merge branch 'main' into initial-nsec3-generation
ximon18 Dec 5, 2024
33178c2
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Dec 5, 2024
10193c7
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 5, 2024
5f6f7e7
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 5, 2024
254b52f
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 5, 2024
bc68b0b
Make key selection more flexible. (#464)
ximon18 Dec 6, 2024
c7f26ac
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 6, 2024
6b7321c
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 6, 2024
64da561
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 6, 2024
7503455
Merge branch 'main' into initial-nsec3-generation
ximon18 Dec 6, 2024
15b72c0
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 Dec 6, 2024
5c23fdb
Update changelog.
ximon18 Dec 6, 2024
c141bf9
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 Dec 6, 2024
660d2f2
Update changelog.
ximon18 Dec 6, 2024
8c583b5
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 Dec 6, 2024
8f97bd3
Update changelog.
ximon18 Dec 6, 2024
85ffaf7
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 Dec 6, 2024
254dc9c
Update changelog.
ximon18 Dec 6, 2024
2359531
Raise errors instead of unwrapping on missing apex.
ximon18 Dec 7, 2024
f788ba5
Add a logging related TODO.
ximon18 Dec 7, 2024
dc79547
Also log the key tag when debug logging the keys to use for signing.
ximon18 Dec 7, 2024
02f64a4
Don't emit duplicate DNSKEY RRs for zonefiles that already contain th…
ximon18 Dec 7, 2024
ca982a4
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 7, 2024
68d7141
FIX: When extending SortedRecords, don't permit duplicate RRs to cree…
ximon18 Dec 7, 2024
200f0bb
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 7, 2024
31fabac
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 7, 2024
9c1cd42
Don't attempt to sign a zone or select keys to use if no keys are pro…
ximon18 Dec 9, 2024
80007c3
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 9, 2024
7f1bcb9
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 9, 2024
55c6975
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 9, 2024
99d4fcc
Improve signing keys debug output.
ximon18 Dec 9, 2024
b92f2f4
FIX: Only sign the apex if given the apex and remove unnecessary erro…
ximon18 Dec 9, 2024
69e8415
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 9, 2024
29cc4a1
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 9, 2024
9c82849
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 9, 2024
2a80b17
Actually check that we were given THE apex, not AN apex.
ximon18 Dec 9, 2024
518b4d7
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 9, 2024
2a956f7
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 9, 2024
23031e5
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 9, 2024
605efe6
Extend zone parsing to let the caller know when the origin has been d…
ximon18 Dec 12, 2024
493e870
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 12, 2024
3320bc9
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 12, 2024
7ff0cf8
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 12, 2024
f7b9351
Revert "Extend zone parsing to let the caller know when the origin ha…
ximon18 Dec 12, 2024
0a71293
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 12, 2024
529e6e6
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 12, 2024
0600feb
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 12, 2024
c0016c1
Use the correct TTL for added DNSKEY RRs when signing.
ximon18 Dec 16, 2024
8ba17e9
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 16, 2024
931d134
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 16, 2024
54ab872
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 16, 2024
b17fb85
FIX: Don't allow duplicate RRs to be imported via `impl From`.
ximon18 Dec 16, 2024
ed4fb30
Add a comment explaining why the apex name we use for an RRSIG meets …
ximon18 Dec 16, 2024
9aa7f7c
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 16, 2024
d3b3da5
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 16, 2024
d124294
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 16, 2024
c93eae7
Merge branch 'main' into initial-nsec3-generation
ximon18 Dec 16, 2024
bb0945a
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Dec 16, 2024
8aadb43
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 16, 2024
aeb6d93
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 16, 2024
c5c422d
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 16, 2024
2034f32
FIX: Sign a merged DNSKEY RR set containing existing and new DNSKEY R…
ximon18 Dec 17, 2024
9cb5d8d
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 17, 2024
d863dba
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 17, 2024
d6a3f1d
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 17, 2024
398e70b
Clippy-suggested code improvements.
partim Dec 18, 2024
f00acc6
WIP: Use a hash provider.
ximon18 Dec 18, 2024
ae94056
Update changelog.
partim Dec 18, 2024
f0d383e
[zonefile/inplace] Handle backslashes in quoted strings
ximon18 Dec 18, 2024
3943d26
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 18, 2024
7deffd0
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 18, 2024
bd7f436
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 18, 2024
a9aa52c
Merge branch 'main' into initial-nsec3-generation
ximon18 Dec 18, 2024
8d53906
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 Dec 18, 2024
6586302
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 18, 2024
3319ec6
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 18, 2024
e4a3aec
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 18, 2024
1342d4c
FIX: Don't omit DNSKEY RRs when signing if there were no pre-exisitng…
ximon18 Dec 18, 2024
29105f5
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 18, 2024
dd120bc
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 18, 2024
8af5518
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 18, 2024
222d862
Don't hard-code NSEC3 hash capture, instead use a HashProvider.
ximon18 Dec 18, 2024
427dd83
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 Dec 19, 2024
072cc4c
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 Dec 19, 2024
a98182b
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 Dec 19, 2024
8911c93
Cargo fmt.
ximon18 Dec 19, 2024
4ad8177
Merge branch 'sortedrecords-zonemd-remove-replace-plus-pr444' into so…
ximon18 Dec 19, 2024
822c95a
Enhanced zone signing. (#418)
ximon18 Dec 19, 2024
4c96f94
Merge branch 'multiple-key-signing' into initial-nsec3-generation
ximon18 Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/rdata/dnssec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2168,6 +2168,11 @@ impl<Octs: AsRef<[u8]>> RtypeBitmap<Octs> {
) -> Result<(), Target::AppendError> {
target.append_slice(self.0.as_ref())
}

#[must_use]
pub fn is_empty(&self) -> bool {
self.iter().next().is_none()
}
}

//--- AsRef
Expand Down
42 changes: 41 additions & 1 deletion src/rdata/nsec3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ impl<Octs> Nsec3<Octs> {
&self.next_owner
}

pub fn set_next_owner(&mut self, next_owner: OwnerHash<Octs>) {
self.next_owner = next_owner;
}

pub fn types(&self) -> &RtypeBitmap<Octs> {
&self.types
}
Expand Down Expand Up @@ -354,7 +358,10 @@ impl<Octs: AsRef<[u8]>> fmt::Display for Nsec3<Octs> {
self.hash_algorithm, self.flags, self.iterations, self.salt
)?;
base32::display_hex(&self.next_owner, f)?;
write!(f, " {}", self.types)
if !self.types.is_empty() {
write!(f, " {}", self.types)?;
}
Ok(())
}
}

Expand Down Expand Up @@ -453,6 +460,10 @@ impl<Octs> Nsec3param<Octs> {
&self.salt
}

pub fn into_salt(self) -> Nsec3Salt<Octs> {
self.salt
}

pub(super) fn convert_octets<Target>(
self,
) -> Result<Nsec3param<Target>, Target::Error>
Expand Down Expand Up @@ -496,6 +507,35 @@ impl<Octs> Nsec3param<Octs> {
}
}

//--- Default

impl<Octs> Default for Nsec3param<Octs>
where
Octs: From<&'static [u8]>,
{
/// Best practice default values for NSEC3 hashing.
///
/// Per [RFC 9276] section 3.1:
///
/// - _SHA-1, no extra iterations, empty salt._
///
/// Per [RFC 5155] section 4.1.2:
///
/// - _The Opt-Out flag is not used and is set to zero._
/// - _All other flags are reserved for future use, and must be zero._
///
/// [RFC 5155]: https://www.rfc-editor.org/rfc/rfc5155.html
/// [RFC 9276]: https://www.rfc-editor.org/rfc/rfc9276.html
fn default() -> Self {
Self {
hash_algorithm: Nsec3HashAlg::SHA1,
flags: 0,
iterations: 0,
salt: Nsec3Salt::empty(),
}
}
}

//--- OctetsFrom

impl<Octs, SrcOcts> OctetsFrom<Nsec3param<SrcOcts>> for Nsec3param<Octs>
Expand Down
1 change: 1 addition & 0 deletions src/sign/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub use self::bytes::{RsaSecretKeyBytes, SecretKeyBytes};

pub mod common;
pub mod openssl;
pub mod records;
pub mod ring;

//----------- SigningKey -----------------------------------------------------
Expand Down
Loading
Loading