Commit Graph

2723 Commits

Author SHA1 Message Date
Daniel McCarney
c96e717871 rdata_parsers: reorder svcb parse helpers
Prev the ECH config parsing was placed in between parsing ipv4 and ipv6
hints. This commit reorders so that `parse_ech_config()` is after
`parse_ipv4_hint()` and `parse_ipv6_hint()`.
2024-04-18 11:57:53 +02:00
Daniel McCarney
8f29bb032d proto: correct ECH service parameter key
Previously `"echconfig"` was being used as the encrypted client hello
(ECH) service parameter key for SVCB/HTTPS RRs.

In RFC960 the parameter key is specified in the intial IANA registry
contents as `"ech"`[0].

This commit updates the two relevant parts of hickory (and corresponding
test data) to use the up-to-date parameter key.

This is a breaking change, however given the very low adoption of ECH,
and the use of the correct `"ech"` key in popular test servers, it
doesn't seem worth trying to maintain backwards compatibility with
earlier draft RFC values.

[0]: https://datatracker.ietf.org/doc/html/rfc9460#section-14.3.2
2024-04-18 11:57:53 +02:00
Daniel McCarney
190c814eb3 svcb: update docs to ref RFC 9460
Since initial support for SVCB/HTTPS RRs landed in hickory-dns, RFC
9460[0] was published:

  Service Binding and Parameter Specification via the DNS (SVCB and HTTPS
  Resource Records)

This is the definitive reference for SVCB and HTTPS RRs and previous
references to `draft-ietf-dnsop-svcb-https-XX` need to be updated.

Thankfully, it seems as though the implementation did not change
meaningfully from draft-03 and so this commit can largely just update
documentation references and copied quotations to match RFC 9460.

One minor change is worth mentioning: the Encrypted Client Hello (ECH)
aspects of the draft were removed pre-publication and the RFC9460 IANA
registry includes a "reserved" allocation for the `"ech"` key, but no
details on its use. These details are now located in a separate draft,
draft-ietf-tls-svcb-ech-01[1].

Since the code in `svcb.rs` also concerned itself with ECH it now
references draft-ietf-tls-svcb-ech-01 where the ECH specific usage of
service parameter is under specification. Notably the new draft and RFC
9460 both use `"ech"` for the service parameter key for encrypted client
hello configs. Hickory-dns is currently using `"echconfig"`, but this
will be fixed in a follow-up commit to keep this one documentation only.

[0]: https://datatracker.ietf.org/doc/html/rfc9460
[1]: draft-ietf-tls-svcb-ech-01
2024-04-18 11:57:53 +02:00
Daniel McCarney
c01db51555 ci: offer a branch push pattern for easy testing
Pushing branches named "$WHATEVER_dev" will result in CI being run. This
is helpful for those working on a fork that want a quick way to test CI
for their branch before opening a PR.
2024-04-18 11:57:53 +02:00
Benjamin Fry
94ac564c3f ignore portions of the README in Oranda site generation 2024-04-14 11:30:50 +02:00
Daniel McCarney
5aeb1d0209 resolver: err for dns-over-rustls w/o roots
If we find that we've constructed a Rustls root cert store that has no
trust anchors, return an early error. This makes the problem obvious
and avoids surfacing some other less specific error cause when we first
try to validate a peer certificate with an empty root store.

In order for our new early error to be surfaced correctly the
`name_sever_pool.rs` `parallel_conn_loop` fn needs its error handling
adjusted. Previously it would always compare the new error produced by
trying to build the TLS config against the default error it starts its
loop with, `ProtoErrorKind::NoConnections`. Since the error being
returned is another `ProtoErrorKind`, and the error specificity
comparison considers two `ProtoErrorKinds` equivalent in the general
case, the default error was always returned and the new error thrown
away.
2024-04-14 07:33:30 +02:00
Daniel McCarney
2e84c1184b error: wrap io::Error in Arc for clone
`ProtoErrorKind` is `Clone`, but the `Io` variant holding `io:Error`
runs into trouble with this: since the error can't be cloned we have to
reconstruct it and this is a lossy process: resulting in a "simple"
`io::Error` that only holds the error type from the parent it was cloned
from. This loses important details like the underlying error
source/message.

This commit changes `ProtoErrorKind::Io` to hold `Arc<io::Error>>`
instead. This makes implementing `Clone` trivial - we clone the arc
- and no error information is lost.
2024-04-14 07:30:55 +02:00
0xffffharry
6c2a1e2c23 Make QuicClientStream Clonable 2024-04-10 09:42:39 +02:00
Dirkjan Ochtman
f1ced8a958 Update semver-compatible dependencies 2024-04-09 21:43:08 -04:00
Dirkjan Ochtman
70be0c5aa0 Upgrade rusqlite to 0.31 2024-03-22 08:33:27 -04:00
Dirkjan Ochtman
b7ce4cc292 Upgrade prefix-trie to 0.3 2024-03-22 08:33:27 -04:00
Dirkjan Ochtman
fced74e477 Update semver-compatible dependencies 2024-03-22 08:33:27 -04:00
Dirkjan Ochtman
4ebc33f2f1 Apply clippy suggestions from Rust 1.77 2024-03-22 08:33:27 -04:00
dependabot[bot]
9e8f8c67fb Bump http from 1.0.0 to 1.1.0
Bumps [http](https://github.com/hyperium/http) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/hyperium/http/releases)
- [Changelog](https://github.com/hyperium/http/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/http/compare/v1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: http
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 14:36:15 -04:00
dependabot[bot]
e9d7075ed4 Bump extractions/setup-just from 1 to 2
Bumps [extractions/setup-just](https://github.com/extractions/setup-just) from 1 to 2.
- [Release notes](https://github.com/extractions/setup-just/releases)
- [Commits](https://github.com/extractions/setup-just/compare/v1...v2)

---
updated-dependencies:
- dependency-name: extractions/setup-just
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 13:45:38 -04:00
David Lönnhager
d2e64d8d26 Break when socket is unexpectedly shut down 2024-03-16 13:21:54 -04:00
Marcus Butler
da41e4ad06 Update mio to 0.8.11 to fix RUSTSEC-2024-0019 2024-03-04 23:03:01 +01:00
Marcus Butler
3db11773cd Fix formatting issue in crates/proto/src/op/message.rs 2024-03-04 23:02:24 +01:00
Hoe Hao Cheng
f382e96a90 Forward hickory-dns's root cert features to hickory-resolver 2024-03-04 14:39:29 +01:00
situ2001
966bc27c6e fix: not returning the result of a let binding from a block 2024-03-02 13:03:23 -05:00
situ2001
92ff81ca29 test: Header count setting 2024-03-02 13:03:23 -05:00
situ2001
b1e35ad619 chore: add comments 2024-03-02 13:03:23 -05:00
situ2001
a85852ab98 feat: add setter methods for Message struct to improve configurability 2024-03-02 13:03:23 -05:00
Benjamin Fry
cf0f048434 rename proven fields to "require" 2024-03-02 11:43:52 -05:00
Benjamin Fry
32a4118ec0 fix some comment and other review issues 2024-03-02 11:43:52 -05:00
Benjamin Fry
574cb82e47 make Proof must_use, add Proven::into_parts 2024-03-02 11:43:52 -05:00
Benjamin Fry
5c53fbcdad add dnssec lookup to Lookup 2024-03-02 11:43:52 -05:00
Benjamin Fry
494fb8df45 Add proven type to require validation before use 2024-03-02 11:43:52 -05:00
Benjamin Fry
d1da894e37 use find_map instead of filter_map in Lookup 2024-03-02 11:43:52 -05:00
Benjamin Fry
6774fb053e clean up after rrsig changes 2024-03-02 11:43:52 -05:00
Benjamin Fry
ec806ae445 change results of validation to always return records 2024-03-02 11:43:52 -05:00
Benjamin Fry
1d2a1df0ee change to Proofs to rrset validation 2024-03-02 11:43:52 -05:00
Benjamin Fry
9fc8fa5bad Better Proofs for DNSKEY validation 2024-03-02 11:43:52 -05:00
Benjamin Fry
c0f93de61e add DS proof validation 2024-03-02 11:43:52 -05:00
Benjamin Fry
98933eeb85 Remove generic Error from DnsHandle 2024-03-02 11:43:52 -05:00
Benjamin Fry
de0b4605b5 simplify async proof validation and reduce clones 2024-03-02 11:43:52 -05:00
Benjamin Fry
46d30cbec8 cleanup some of the clones of records on verification 2024-03-02 11:43:52 -05:00
Benjamin Fry
a549a35252 add in additionals for validation 2024-03-02 11:43:52 -05:00
Benjamin Fry
14f4f0a4b6 add a test for Secure records 2024-03-02 11:43:52 -05:00
Benjamin Fry
70d8e6fc0f add Proof to resource::Record 2024-03-02 11:43:52 -05:00
Benjamin Fry
c15b91abdf remove unnecessary clones of rrsig in dnssec 2024-03-02 11:43:52 -05:00
Benjamin Fry
8538d68f8d Notes on changes to dnssec proof, and unwrap RRSIG from Record 2024-03-02 11:43:52 -05:00
Benjamin Fry
1723a15260 remove with deprecation 2024-03-02 11:43:52 -05:00
Benjamin Fry
e2c82f6991 change internal usage from set_rr_type to set_record_type 2024-03-02 11:43:52 -05:00
Benjamin Fry
c0c2b2fa89 make dnssec methods more type safe 2024-03-02 11:43:52 -05:00
Benjamin Fry
bc044e89f3 Add Proof to NSEC results 2024-03-02 11:43:52 -05:00
Benjamin Fry
552fa36dc3 Add Proof type for DNSSEC 2024-03-02 11:43:52 -05:00
Ensar Sarajčić
0a2ee2c655 Add test case with multiple options with same code 2024-02-29 09:45:14 -05:00
Ensar Sarajčić
e9eeb6533d Fix clippy errors 2024-02-29 09:45:14 -05:00
Ensar Sarajčić
9a209530f4 Add a note about multiple options with same code 2024-02-29 09:45:14 -05:00