Commit Graph
13 Commits
Author SHA1 Message Date
f6ae5d744c Add verbosity option (#110)
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
2025-08-08 12:41:00 +02:00
28fc39d401 Format keygen and key2ds subcommand output using tabs like ldns-keygen and ldns-key2ds. (#48)
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
Co-authored-by: Jannik Peters <jannik@nlnetlabs.nl>
2025-08-07 10:31:03 +02:00
Ximon EighteenandGitHub 7ec5de2bc6 Add signzone command. (#8)
Note: Lacks Bubble Babble and OpenSSL Engine support compared to the original `ldns-signzone`.
2025-06-02 14:32:55 +02:00
Terts Diepraam bb54843b1e logging: use tracing instead of custom logging code 2025-04-23 11:37:00 +02:00
Terts Diepraam fa974de9b2 add log module and warning/error printing macros 2025-04-22 16:53:08 +02: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 Diepraam 178468ce00 rework ldns command matching to use file-stem and give errors 2024-11-22 11:59:49 +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 DiepraamandGitHub 5874f11dcc Add ldns binary for easier testing of ldns tools (#20) 2024-11-12 16:34:08 +01:00
Jannik Peters bd0c9d7118 Add basic clap scaffolding a la dnsi 2024-08-29 10:51:44 +02:00