Commit Graph
32 Commits
Author SHA1 Message Date
Ximon Eighteen ac39540caa When invoked as LDNS write RRSIG timestamps in RFC 4034 3.2 YYYYMMDDHHmmSS format instead of seconds since the epoch format. 2024-12-10 12:52:32 +01:00
Ximon Eighteen ba0d67afcb Re-order dev dependencies alphabetically and use the pretty_assertions crate to get more readable assert_eq() diff output. 2024-12-09 11:55:04 +01:00
Ximon Eighteen e2810b218d Add an integration test based on an existing LDNS test. 2024-12-05 10:59:56 +01:00
Ximon Eighteen ff32c80c53 Remove commented line. 2024-12-03 23:55:00 +01:00
Ximon Eighteen 2c1dfeb523 Merge branch 'main' into add-ldns-like-sign-zone-support 2024-12-03 23:47:39 +01:00
Ximon Eighteen 489d762444 - Upgrade to latest domain changes.
- Add support for `-A`.
- Add support for `-U`.
- Fix failure to print additional RRSIGs when signing with more than one key.
2024-12-03 21:25:52 +01:00
9432f4897d Notify (#7)
* start work on notify

* continue on notify

* various fixes to notify

* notify: incorporate feedback from @mozzieongit

* notify: update outdated terminology

* notify: fix up comment

* update: fix up error message

Co-authored-by: Jannik <jannik@nlnetlabs.nl>

* notify: temporarily remove -I because it's not supported

* notify: imports compliant with domain's CONTRIBUTING.md

* notify: improve error message for TSIG parsing

* start testing notify!

* stelline tests for notify

* notify: implement ldns argument parsing

* fix CI

* cargo fmt

* update last occurrence of rust 1.78

* fix lazy_static to 1.0.2 for minimal-versions

* bring up to date with initial-nsec3-hash

* imports more in domain style

* notify (and other ldns utils): add support for printing version to env

* notify: simplify with Box<dyn SendRequest<_>>

* notify: improve help and error messages

---------

Co-authored-by: Jannik <jannik@nlnetlabs.nl>
2024-12-02 14:21:59 +01:00
617b623ba3 Add keygen command. (#9)
* Keygen skeleton.

* [keygen] Implement the basic features

* [keygen] synchronize files before exiting

* [keygen] Add help documentation

* [keygen] Generate '.ds' files for KSKs

* [keygen] Use 'display_as_bind()'

* [keygen] Add support for symlinks (Unix only)

* [keygen] Improve errors and support '.ds' symlinks

* Implement ldns-specific parsing for 'keygen'

* [keygen] Implement '-v' with version info

* [keygen] Add 'cfg(unix)' in ldns-parsing

* [keygen] Correctly handle duplicate options in ldns parsing

* Revert "[keygen] Implement '-v' with version info"

This reverts commit 643ab86bd4.

See: <https://github.com/NLnetLabs/dnst/pull/9#discussion_r1843460496>

* [keygen] Integrate the use of 'Env'

* [workflows/ci] Add OpenSSL installation steps

* [workflows/ci] Integrate OpenSSL for 'minimal_versions'

* [keygen] Improve the 'dnst' interface

* [keygen] Satisfy clippy

* [keygen] Simplify symlink CLI

* Add basic filesystem operations to 'Env'

* [keygen] Use symlink ops provided by 'Env'

* [keygen] Add basic tests for argument parsing

* [keygen] Add tests

* [keygen] Satisfy 'minimal-versions'

* [keygen] Satisfy clippy

* [keygen] Add Windows-specific missing branch

* [keygen] Document parsing for 'symlink'

* [keygen] Report error on '-r'

* [env] Refactor util fns into a 'util' module

* [keygen::symlink] Mark params as used, for Windows

* [keygen] Fix double error message

See: <https://github.com/NLnetLabs/dnst/pull/9#discussion_r1862213985>

* [keygen] Use 'Args::Report'

* [keygen] Allow invalid HTML in docs for Clap

* Use 'domain'-style imports

* [keygen] Use uppercase for expected clap values

* [keygen] use lowercase value names in Clap

---------

Co-authored-by: arya dradjica <arya@nlnetlabs.nl>
2024-12-02 11:20:21 +01:00
Ximon Eighteen 6064a19cde Build against temporary branch of domain that contains all latest changes. 2024-12-02 10:42:58 +01:00
Ximon Eighteen 544cdd218c Merge branch 'main' into add-ldns-like-sign-zone-support 2024-11-29 21:11:03 +01:00
Terts Diepraam 40c5eb1d3f all: add version printing mechanism 2024-11-28 16:43:23 +01:00
Jannik Peters 5c248eda2e Use zonemd and multisign aggregated domain branch 2024-11-27 12:23:08 +01:00
Jannik Peters 38f396f5ee Add octseq and ring to Cargo.toml 2024-11-27 11:32:03 +01:00
Ximon Eighteen 844ca3cfdb Merge branch 'main' into add-ldns-like-sign-zone-support 2024-11-25 15:08:51 +01:00
9744d9e1ca Add nsec3-hash command. (#6)
Co-authored-by: Jannik <jannik@nlnetlabs.nl>
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2024-11-22 13:48:10 +01:00
Ximon Eighteen 9eb17c2528 Rename variable diagnostic_comments to extra_comments because comments must always output (e.g. for DNSKEY).
Add sorting to match LDNS signzone zone file ordered output.

Moves per type comment output into impls of new trait `Commented`.
2024-11-22 11:43:20 +01:00
Jannik Peters 9cdba55750 Merge branch 'main' into add-ldns-like-sign-zone-support 2024-11-20 12:39:23 +01:00
Terts DiepraamandGitHub 511c8f1f6a Implement Key2ds (#2) 2024-11-19 13:45:18 +01:00
18d56a6431 Introduce an Env trait to mock the outside world (#23)
* introduce and Env trait to mock the outside world

* make argument parsing unit-testable

* add get_stderr to FakeEnv

* fakecmd and print errors into the env

* change ExitCode::from to into

Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>

* update some comments

* cargo fmt

* document some more of the testing utilities

* use exit_code method on clap errors

* bump minimal clap version

* reexport RealEnv

* remove .lock() calls for stdout and stderr

* remove args field from FakeCmd

* improve docs for Env

* cargo fmt

* use mutex in FakeStream

* improve FmtWriter implementation for a tiny bit more performance

* car go ffffffmmmmmmtttttt

---------

Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
2024-11-15 13:47:18 +01:00
Terts Diepraam 20027e22b4 fix not having a default-run target 2024-11-12 17:26:19 +01:00
Terts DiepraamandGitHub 5874f11dcc Add ldns binary for easier testing of ldns tools (#20) 2024-11-12 16:34:08 +01:00
Ximon Eighteen edd863826b Update ldns-signzone to use new lexopt parser. Change dnst signzone default number of NSEC3 iterations to zero to match RFC 9276. 2024-11-11 23:11:00 +01:00
Ximon Eighteen 01dba27868 Merge branch 'main' into add-ldns-like-sign-zone-support 2024-11-11 23:02:04 +01:00
bae3b00041 Separate ldns parsing from clap parsing (#19)
* Separate ldns parsing from clap parsing

Co-authored-by: Jannik Peters <jannik@nlnetlabs.nl>

* nsec3-hash: sort ldns argument parsing alphabetically

* abort ldns parsing early on malfored argv[0]

* add 'Error' prefix to ldns parsing errors

* use clap default exit code of 2 for dnst versions of commands

* remove args_overide_self from nsec3hash

* move parse_os and parse_os_with out of LdnsCommand

---------

Co-authored-by: Jannik Peters <jannik@nlnetlabs.nl>
2024-11-11 15:52:26 +01:00
Ximon Eighteen a82778af0b Use new domain key size support to output size = 256b or similar in DNSKEY RR comments to match ldns-signzone behaviour. 2024-11-08 13:25:06 +01:00
Ximon Eighteen 05cbde000a Review feedback: Remove redundant dependency. 2024-11-05 15:23:54 +01:00
Ximon Eighteen eb8ffc5531 Fix minimal-versions compilation failure caused by lack of support in Bytes for From<Box<[u8]>> in older versions of Bytes. 2024-11-05 13:35:21 +01:00
Ximon Eighteen 6908dbce76 Update to latest version of domain branch, which fixes default algorithm argument handling too. 2024-10-29 14:21:14 +01:00
Ximon Eighteen 10309ca858 Load signing keys from BIND keyfile sets. 2024-10-17 15:16:49 +02:00
Ximon Eighteen 076df4d8aa Initial hacky WIP ldns-signzone like support using a modified version of domain that has WIP nsec3 support and a modified version of the PR #406 key management support. 2024-10-11 13:31:46 +02:00
JannikandGitHub 478f5f017a Implement nsec3-hash (#1) 2024-09-10 12:28:12 +02:00
Jannik Peters bd0c9d7118 Add basic clap scaffolding a la dnsi 2024-08-29 10:51:44 +02:00