Commit Graph
123 Commits
Author SHA1 Message Date
Ximon Eighteen 18e4007253 Warning and error logging refactoring and cleanup. 2024-11-27 09:40:52 +01:00
Ximon Eighteen 7b2659fbf3 Remove commented out code. 2024-11-27 09:20:52 +01:00
Ximon Eighteen a7503e44a1 Remove duplicate comment. 2024-11-27 09:19:06 +01:00
Ximon Eighteen 8ec7479be5 Remove unused code. 2024-11-27 08:59:25 +01:00
Ximon Eighteen b0b4c10a31 Remove incorrect formatting logic. 2024-11-27 08:56:31 +01:00
Ximon Eighteen fd08b03487 Removed outdated TODO comment. 2024-11-27 08:50:35 +01:00
Ximon Eighteen 5ec81278cd Update help texts to match updated key discovery behaviour. 2024-11-27 08:50:23 +01:00
Ximon Eighteen d68c919f60 Fix lifetime error. 2024-11-27 00:12:03 +01:00
Ximon Eighteen 221bba1aa7 Cargo fmt. 2024-11-26 23:55:03 +01:00
Ximon Eighteen 724846ac00 Add LDNS style warnings about chosen iteration counts. 2024-11-26 23:54:56 +01:00
Ximon Eighteen 6297442e68 Factor out ANSI colourisation support. 2024-11-26 23:54:36 +01:00
Ximon Eighteen 5894db770d Pass an is_ldns flag to commands. 2024-11-26 23:54:10 +01:00
Ximon Eighteen 3d16bb337a Move ? operator to more logical location: attached to the fn call it relates to. 2024-11-26 23:52:30 +01:00
Ximon Eighteen 084d9a4a8b Remove commented out code. 2024-11-26 23:51:46 +01:00
Ximon Eighteen 0cc0535df1 Change 'A' custom dnst option to 'P' because 'A' is needed for an existing LDNS option. 2024-11-26 17:05:51 +01:00
Ximon Eighteen add8bdb052 Improved LDNS compatibility: Use DNSKEY RRs that correspond to loaded private keys else fall back to loading public keys. 2024-11-26 12:11:19 +01:00
Ximon Eighteen e2f1d86e56 Add missing import. 2024-11-25 15:56:02 +01:00
Ximon Eighteen a47dd4efcc Fix tests. 2024-11-25 15:55:38 +01:00
Ximon EighteenandGitHub 02bd14d9ec Don't over allocate. 2024-11-25 15:46:44 +01:00
Ximon Eighteen 86b56535d8 Make LDNS output re-ordering for readability an optional off-by-default behaviour as it is performance impacting and not required for valid signed zone output. 2024-11-25 15:29:24 +01:00
Ximon Eighteen 342144ac3c Improve zone writing performance by buffering output. 2024-11-25 15:14:33 +01:00
Ximon Eighteen 844ca3cfdb Merge branch 'main' into add-ldns-like-sign-zone-support 2024-11-25 15:08:51 +01:00
Ximon Eighteen 28f7f32d21 Merge branch 'add-ldns-like-sign-zone-support' of github.com:NLnetLabs/dnst into add-ldns-like-sign-zone-support 2024-11-25 14:59:55 +01:00
Ximon Eighteen bb46747954 Support LDNS keys must match zone functionality. 2024-11-25 14:59:25 +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
Ximon Eighteen ed60fc75c9 Don't output ; lines if -b is not enabled. 2024-11-22 11:46:26 +01:00
Ximon Eighteen 5dfff42c22 Always output comments for DNSKEY RRs. 2024-11-22 11:45:21 +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 adbaf06e55 Clippy 2024-11-21 17:02:57 +01:00
Jannik Peters 7828d4dc57 Update Cargo.lock for domain 2024-11-21 16:57:05 +01:00
Jannik Peters 907a63438c Fix error without keys 2024-11-21 16:42:28 +01:00
Jannik Peters 32ca8f7ca0 Fix writing to stdout or file 2024-11-21 16:40:41 +01:00
Jannik Peters f46fdd9683 Format 2024-11-20 12:53:29 +01:00
Jannik Peters 9cdba55750 Merge branch 'main' into add-ldns-like-sign-zone-support 2024-11-20 12:39:23 +01:00
Ximon EighteenandJannik Peters ead8fc64a5 Remove wrongly committed sym link. 2024-11-20 10:57:17 +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
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
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