Commit Graph
45 Commits
Author SHA1 Message Date
Philip Homburg 2129fc2b36 Store key references are file URLs. 2025-06-17 09:46:20 +02:00
Philip Homburg 5d946beaac Remove unneeded format!. 2025-06-12 15:23:25 +02:00
Philip Homburg 932844569e Fix up merge. 2025-06-12 15:08:01 +02:00
Philip Homburg 19c2ff1383 Merge branch 'main' into keyset 2025-06-12 13:58:25 +02:00
Philip Homburg 3583c32004 Support for algorithm rolls. 2025-06-12 13:51:38 +02:00
Ximon EighteenandGitHub 4f12ded4e0 Package dnst as DEB & RPM packages, and Docker images. (#22)
Note:
- Man pages have to be generated via `make man` and committed to Git to be included in the generated packages.
- Docker images are built but not yet published to Docker Hub as the required automation credentials have not yet been provisioned.
2025-06-04 10:34:56 +02:00
Ximon Eighteen d1246b6227 Compilation fix. 2025-06-03 09:57:54 +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
Ximon EighteenandGitHub 0dcd6ee03c Add support for -I to notify. (#85)
Duplicates `UdpConnect` from `domain` and extends it to support setting the source address.
2025-05-30 13:53:40 +02:00
Philip Homburg 97e218b6a3 Make sure key tags are unique. 2025-05-28 11:54:12 +02:00
Terts DiepraamandGitHub 9fb6e0b56e Merge pull request #62 from NLnetLabs/log-warnings
Use `tracing_subscriber` to print warnings and errors
2025-05-23 12:21:43 +02:00
Philip Homburg df5ef0ef30 Avoid starting a KSK keyroll before init. 2025-05-22 16:42:56 +02:00
Philip Homburg 54fd380963 Display *-generate-params as *-algorithm in show. 2025-05-06 10:56:32 +02:00
Terts Diepraam 244112c26e print error context with tracing as well 2025-04-23 12:58:40 +02:00
Terts Diepraam 93fcbaec50 fix clippy lints 2025-04-23 11:40:59 +02:00
Terts Diepraam bb54843b1e logging: use tracing instead of custom logging code 2025-04-23 11:37:00 +02:00
Philip Homburg 2ee55286fc The CDS/CDNSKEY RRsets also need to be signed. Cron command. 2025-04-23 11:22:06 +02:00
d28f507df5 nsec3-hash: set default number of iterations to 0 (#64)
* nsec3-hash: set default number of iterations to 0

This reverts commit 645fd13e62.

* Update the ldns-nsec3-hash man page to reflect the changed default number of iterations.

---------

Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
2025-04-23 09:32:18 +02:00
Terts Diepraam fa974de9b2 add log module and warning/error printing macros 2025-04-22 16:53:08 +02:00
Philip Homburg 3621409542 Now with keyset.rs. 2025-04-17 15:44:51 +02:00
Philip Homburg f8c1453bdb Initial version of keyset. 2025-04-17 13:37:25 +02:00
Terts Diepraam 0c2125f0bb Fix up newlines in error printing 2025-04-16 12:13:06 +02:00
Terts DiepraamandGitHub 1d5c32d1ef Merge pull request #57 from NLnetLabs/dont-send-opt-with-notify
Don't send EDNS(0) OPT record with NOTIFY.
2025-04-15 14:48:14 +02:00
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 Diepraam a50a3eff47 sync with domain dnssec restructure 2025-04-15 10:02:28 +02:00
Ximon EighteenandGitHub b0c4c876ad Update notify.rs
See https://github.com/opendnssec/opendnssec/pull/865.
2025-02-28 14:09:33 +01: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
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 40c5eb1d3f all: add version printing mechanism 2024-11-28 16:43:23 +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
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
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
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
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