Commit Graph
38 Commits
Author SHA1 Message Date
Ximon EighteenandGitHub f859a2ed10 Re-order dnst commands alphabetically. (#54)
* Re-order dnst commands alphabetically.

* Also re-order the match block alphabetically.
2025-04-15 12:14:58 +02:00
Terts DiepraamandGitHub 2d93701453 Merge pull request #58 from NLnetLabs/sync-with-domain
Sync with domain dnssec restructure
2025-04-15 11:01:34 +02:00
Terts Diepraam a50a3eff47 sync with domain dnssec restructure 2025-04-15 10:02:28 +02:00
Koen van HoveandGitHub e2975c3d87 Fix hamburger menu in documentation (#50) 2025-04-14 21:51:54 +02:00
Ximon Eighteen 53561781df Return to buildnig against latest domain rather than a pinned last working version. 2025-01-27 15:34:10 +01:00
arya dradjicaandGitHub 694a30ee29 [keygen] Correct lists of supported algorithms (#51)
* [keygen] Correct lists of supported algorithms

* [CI] Always enable 'ring' or 'openssl' features
2025-01-08 13:06:17 +01:00
arya dradjica f781abafc8 hotfix: lock 'domain' dep to a working commit
Recent changes to the 'initial-nsec3-generation' branch invalidate the
current code -- temporarily locking to a specific commit until those
changes are propagated into 'main'.
2025-01-08 12:43:48 +01:00
Alex BandandGitHub 00756178e9 Present tense 2025-01-07 21:24:04 +01:00
6f0e27d3e1 Implement ldns-update and dnst update (#10)
* implement ldns-update and dnst update

* implement TSIG support for dnst update

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

* Use RequestMessage instead of RequestMessageMulti as we're expecting to receive multiple responses because we don't expect to send XFR requests.

* Clippy.

* update: fix parsing of optional IP addr

* WIP

* update: make it compile after rebase

* start testing update

* update: stelline test

* update: fix some comments and strings

* update: improve TSIG error message

* update: use lookup_host instead of manual A query

* notify & update: merge the separate TSigInfo instances

* update: look in both answer and authority sections

* fix duplicate clippy attribute

---------

Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
2024-12-02 14:33:03 +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
Terts DiepraamandGitHub 7e2b9a6cb7 Merge pull request #39 from NLnetLabs/report-command
All: add version printing mechanism via `Report` command
2024-11-28 16:50:13 +01:00
Terts Diepraam 40c5eb1d3f all: add version printing mechanism 2024-11-28 16:43:23 +01:00
Terts DiepraamandGitHub 09d7631810 Merge pull request #38 from NLnetLabs/remove-command-into
all: remove Command::from implementations
2024-11-28 16:04:18 +01:00
Terts Diepraam 2f2c17c9f2 all: remove Command::from implementations 2024-11-28 15:02:05 +01:00
Terts DiepraamandGitHub 7036a583f7 Merge pull request #33 from NLnetLabs/rework-matching-on-ldns
Rework ldns command matching to use file-stem and give errors
2024-11-22 16:31:50 +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
arya dradjicaandGitHub 18dd6e7ebc [error] Add 'bail' and 'ensure' macros (#29)
* [error] Add 'bail' and 'ensure' macros

* [error] Export 'bail' and 'ensure' from the right module

* [error] Document macro exporting trick

* [error] Adjust semicolons in bail macros
2024-11-22 13:27:06 +01:00
Terts Diepraam 178468ce00 rework ldns command matching to use file-stem and give errors 2024-11-22 11:59:49 +01:00
bfbf492e32 Add manual pages (#26)
* Fix sphinx default language

* Add ldns-nsec3-hash man page based on the original, and adjust the dnst-nsec3-hash page to match the current help output of the command.

* Update dnst-nsec3-hash.rst

* Add key2ds manual

* Add dnst-keygen manual

* Change dnst-keygen algorithms to list from table

* Change dnst-keygen algorithms back to table

* Add ldns-keygen manual

* Add notify manuals

* Add signzone manuals

* Add subcommands to dnst manual and table of contents

* Update dnst-nsec3-hash manual

* Add update manual

* Apply feedback

* Apply further feedback

* Move signzone date description into own section

* Update signzone hash iterations manual text

* Add Arguments sections

* Add basic intro text for dnst

* Fix ldns-signzone default nsec3 hash iterations

* Update nse3-hash defaults and wording

* Update dnst-key2ds ignore-sep and force

* Update nse3-hash default to what it is currently in main

---------

Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2024-11-19 14:26:24 +01:00
Terts DiepraamandGitHub 511c8f1f6a Implement Key2ds (#2) 2024-11-19 13:45:18 +01:00
Terts DiepraamandGitHub a014f13c09 Make the output of Env::std{out, err} a concrete type (#27)
* make the output of Env::std{out, err} a concrete type

* document why the unwrap in write_fmt is okay
2024-11-15 16:13:35 +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
Ximon EighteenandGitHub 459a758d18 Rename pkg-rust.yml to pkg.yml 2024-11-13 21:44:59 +01:00
Ximon EighteenandGitHub 41157b3057 Skeleton pkg workflow.
To cause GH to enable the pkg workflow so that it can be further developed and tested in PR #22.
2024-11-13 21:43:58 +01:00
Terts DiepraamandGitHub 2400fde2a0 Merge pull request #21 from NLnetLabs/fix-cargo-run
fix not having a default-run target
2024-11-12 18:31:28 +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
8dc82c7ff6 Add context tracking for errors (#18)
* [error] Introduce context tracking

* [error] Add an extension trait to 'Result'

* [error] Move pretty-printing to explicit function

* Pretty-print errors on exit

* [erro] Fix primary field documentation

---------

Co-authored-by: arya dradjica <arya@nlnetlabs.nl>
2024-11-11 19:55:46 +01:00
Alex BandandGitHub 2e6d8a9199 Create .readthedocs.yaml 2024-11-11 15:55:57 +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
Martin HoffmannandGitHub fd099cedc4 Add scaffolding for docs plus man pages for dnst and dnst nsec3-hash. (#11) 2024-11-11 15:31:16 +01:00
Ximon EighteenandGitHub 24d22a9854 Add Cargo.lock to Git (because dnst is a binary and because we do that for other binaries such as Routinator). (#17) 2024-11-05 18:59:52 +01:00
Ximon EighteenandGitHub 1aaf2494e0 Add CI workflow. (#12) 2024-10-31 22:08:42 +01:00
Alex BandandGitHub 04a4a2b0cd Skeleton readme 2024-10-23 12:33:23 +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
JannikandGitHub 729a08089e Initial commit 2024-08-28 13:21:28 +02:00