Commit Graph

2938 Commits

Author SHA1 Message Date
Jorge Aparicio
76d308c984
Merge pull request #43 from ferrous-systems/ja-immutable-subject-peer
turn `dns_test::{subject,peer}` into immutable statics
2024-05-22 14:16:27 +02:00
Jorge Aparicio
58239028f4 turn dns_test::{subject,peer} into immutable statics
using `std::env::set_var` to set or change the value of either
DNS_TEST_SUBJECT or DNS_TEST_PEER  is A Bad Idea, specially so when
tests  are running in parallel

we can't forbid the use of `env::set_var` _but_ at least we can ensure
that even in its presence the return value of `dns_test::{subject,peer}`
will not change

this is accomplished using a "lazy" static variable that gets
initialized at most once during the lifetime of the process instead of
reading the env var each time `{subject,peer}` is called

to better convey the fact that the return value of `{subject,peer}`
won't change, we present them as static variables instead
2024-05-22 14:03:18 +02:00
Dirkjan Ochtman
107635c6c5 Update dependencies 2024-05-21 10:24:01 -07:00
Dirkjan Ochtman
cde6f908c2 Remove broken mtls code 2024-05-21 10:24:01 -07:00
Sebastian Ziebell
2e46421927 Check hickory-dns is fully started
When starting `hickory-dns` there is no easy way to check the start
sequence has finished & its fully ready to accept connections. Other
tools, e.g. unbound, are designed as services, they will correctly
manage their `pidfile`. They also could be queried by the `servicectl`
inside the Docker container.
2024-05-21 15:05:29 +01:00
Benjamin Fry
978235f7cd add RFC2931 SIG(0) as supported 2024-05-21 11:33:19 +02:00
Jonathan Davies
dbb48114ce cargo: Enable LTO on release build. 2024-05-19 07:30:40 -07:00
Adrian Kappel
ede83dc7d6
Adds deref call in assertion for hickory-client README example (#2173)
* Adds deref call in assertion

* Adds inner struct to pattern match

---------

Co-authored-by: Benjamin Fry <benjaminfry@me.com>
2024-05-18 11:40:03 -07:00
Jorge Aparicio
f868f8e27d recursor: send DS query to the parent zone 2024-05-18 11:33:35 -07:00
Benjamin Fry
202c2304da retry all tcp on all IO errors recieved from UDP requests 2024-05-18 09:54:28 +02:00
Benjamin Fry
27018620b7 remove IO error from ResolveError and only use ProtoError(Io) 2024-05-18 09:54:28 +02:00
Dirkjan Ochtman
872ada02ef recursor: rename Recursor::new() to builder() 2024-05-18 09:38:36 +02:00
Dirkjan Ochtman
5db65e336b recursor: make security awareness depend on config 2024-05-18 09:38:36 +02:00
Jorge Aparicio
97e1f43456 expose security-aware setting in named.toml 2024-05-10 18:25:18 -07:00
Jorge Aparicio
36258a8a03 make Recursor configurable via a "builder"
and make security-awareness opt-in
2024-05-10 18:25:18 -07:00
Jorge Aparicio
f3a012cc36 recursor: honor DO bit in client's query 2024-05-10 18:25:18 -07:00
Jorge Aparicio
e558fcc43c recursor: preserve DNSSEC records 2024-05-10 18:25:18 -07:00
Jorge Aparicio
cc81d5636e recursor: set DO in outgoing queries
when the recursor is "security-aware" -- that is the "dnssec" feature is
enabled -- as per RFC 4035 section 3.2.1
2024-05-10 18:25:18 -07:00
Jorge Aparicio
fe3961ffe1
Merge pull request #42 from ferrous-systems/ja-terminate-hickory
implement terminate for Hickory
2024-05-08 12:44:14 +02:00
0xffffharry
cffc3fac2a Make H3ClientStream Clonable 2024-05-04 11:13:01 -07:00
Divma
c1f2e9b4de
address new clippy lint assigning-clones (#2205) 2024-05-02 21:35:29 +02:00
Diva M
3799e13f7b fix copy-pasted sentence 2024-04-30 08:11:57 -07:00
Diva M
03b0daca71 fix misc typos in md top files 2024-04-30 08:11:57 -07:00
dependabot[bot]
9f27fcc0dc Bump parking_lot from 0.12.1 to 0.12.2
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.12.1 to 0.12.2.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.2)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 16:54:57 +02:00
Jorge Aparicio
4f277c1dbb implement terminate for Hickory
both in the NameServer and Resolver roles
2024-04-22 17:14:11 +02:00
Jorge Aparicio
6189787d9f
Merge pull request #51 from ferrous-systems/ja-hickory-name-server-take-2
support Hickory in the NameServer role
2024-04-22 16:51:29 +02:00
Jorge Aparicio
74e4797061 add a DNSSEC-disabled NameServer scenario test
to ensure that hickory-dns is correctly configured to work in NameServer
mode
2024-04-22 16:40:56 +02:00
Jorge Aparicio
ce222b3de1 support Hickory in NameServer role
note that because Hickory does not support pre-signed zone files all the
DNSSEC tests fail with it
2024-04-22 16:40:56 +02:00
Jorge Aparicio
05ffecec45 add a few NameServer role DNSSEC tests 2024-04-22 16:40:56 +02:00
Jorge Aparicio
4ce9ec9937
Merge pull request #50 from ferrous-systems/ja-ede-support-take-2
add support for Extended DNS Error (EDE)
2024-04-22 16:40:38 +02:00
Jorge Aparicio
b96aa89da9 add more EDE tests 2024-04-22 16:23:03 +02:00
Jorge Aparicio
4d31eca533 use Graph to simplify tests 2024-04-22 16:23:03 +02:00
Jorge Aparicio
7bb6b9439c add name_server::Graph 2024-04-22 16:23:03 +02:00
Jorge Aparicio
95f94e2c7b add first EDE test 2024-04-22 16:23:03 +02:00
Jorge Aparicio
31048f5cd0 extend DNSKEY API 2024-04-22 16:23:03 +02:00
Jorge Aparicio
dc19776107 parse EDE info from dig's output 2024-04-22 16:23:03 +02:00
Jorge Aparicio
166863bcc4 allow enabling Extended DNS Errors (EDE) 2024-04-22 16:23:03 +02:00
Jorge Aparicio
75de211a06
Merge pull request #49 from ferrous-systems/ja-resolver-builder-take-2
refactor: use builder pattern in Resolver ctor
2024-04-22 16:22:38 +02:00
Jorge Aparicio
70245e7ff8 refactor: use builder pattern in Resolver ctor
the `start` constructor's parameter list was getting long and we want to
add even more configuration options, like EDE, in the future.

using the builder pattern lets us introduce new settings without
breaking changes
2024-04-22 16:18:47 +02:00
Jorge Aparicio
63c95fd0db
Merge pull request #48 from ferrous-systems/ja-refactor-impl-take-2
refactor Implementation branching into its own module
2024-04-22 16:18:24 +02:00
Jorge Aparicio
9689568974 refactor Implementation branching into its own module 2024-04-22 16:07:36 +02:00
Benjamin Fry
6334a01430 update rustls 0.21.11 to fix audit 2024-04-20 23:20:44 +02:00
situ2001
cad6eed6b4 fix: update ip of example.com 2024-04-20 13:08:29 -07:00
situ2001
eb79382a36 fix: update ip of example.com 2024-04-20 13:08:29 -07:00
Benjamin Fry
76a4b84216 fix 0.24.1 Changelog entry 2024-04-18 13:32:26 -07:00
Dirkjan Ochtman
5d2098b27f Bump version to 0.24.1 2024-04-18 13:32:26 -07:00
Benjamin Fry
cf46fd476d add 0.24.1 release note 2024-04-18 13:32:26 -07:00
Daniel McCarney
0b70253e86 rdata_parsers: fix handling of escaped list delim
The RFC 9460 presentation syntax allows escaping the ',' list separator
in a `SvcParamValue` by writing `\,`. This commit updates `parse_list`
to handle this case.

Once this is done, one of the RFC 9460 test vectors using this feature
can be added to the unit tests. We don't yet support the more
complicated escaped comma using an escaped backslash for delimiter
escape so one remaining test vector for this is left out.
2024-04-18 11:57:53 +02:00
Daniel McCarney
2a91cdb066 proto: fix parse of arbitrary keys in pres. syntax
Previously the `FromStr` impl for `SvcParamKey` had support for parsing
the "arbitrary key" presentation syntax where a key can be specified
"keyNNNNN", where NNNNN is the numeric value of the key type without
leading zeros. The existing code would pull out the numeric component
into a `u16` and then use the `TryFrom<u16>` impl for `SvcParamKey` to
get the key.

However, the `TryFrom<u16>` impl for `SvcParamKey` was using the IANA
service parameter keys registry to map from u16s to `SvcParamKey`.
Values 0..6 are mapped to the known key entries. The reserved range
(65280-65534) was mapped to `SvcParamKey::Key`, and 65535 was mapped to
`SvcParamKey::Key65535`. This makes sense when mapping an arbitrary u16,
but when we are parsing a "keyNNNNN" presentation syntax item, we want
to represent it as `Key(NNNNN)`, no matter if it is/isn't a registered
key.

This commit fixes this behaviour, constructing a `SvcParamKey::Key()`
entry when parsing the arbitrary key presentation syntax, avoiding
`TryFrom<u16>`.

With this change in place the two arbitrary key test vectors can be
included in the svcb test vector unit test.

[0] https://datatracker.ietf.org/doc/html/rfc9460#name-initial-contents
2024-04-18 11:57:53 +02:00
Daniel McCarney
2913b659e3 rdata_parsers: add RFC 9460 test vectors
See https://datatracker.ietf.org/doc/html/rfc9460#appendix-D

Tests that we can parse the presentation format for each of the positive
test vectors.

Possible follow-up work:
  * Add the negative failure tests
  * Add coverage for wire format matching expected
2024-04-18 11:57:53 +02:00