Commit Graph
89 Commits
Author SHA1 Message Date
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
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 Eighteen df8426976d Remove guidance concerning key files in help text which is correct for ldns-signzone but not yet supported by dnst signzone.
Also, remove hard-coded line breaks in the help tetx so that the terminal can wrap the text as it will the rest of the help.
2024-11-08 13:30:04 +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 44c9a25a81 Also output DNSKEY RR comments when -b is not provided, to match ldns-signzone behaviour. 2024-11-07 22:12:46 +01:00
Ximon Eighteen 8d6b807a1f Add support for -u including its undocumented +1 behaviour. 2024-11-07 14:32:03 +01:00
Ximon Eighteen 231f0c74ec Cleanup imports. 2024-11-07 13:19:53 +01:00
Ximon Eighteen da4737f423 Make -f <zonefile>.signed the default behaviour. 2024-11-07 13:18:32 +01:00
Ximon Eighteen b3e9b36aac Update domain. 2024-11-07 13:05:18 +01:00
Ximon Eighteen 3e11af384c Add '-f' support.
Add multiple '-b' support to override disabling of '-b' when '-f -' is used.
2024-11-07 13:05:02 +01:00
Ximon Eighteen 4ff8107ebe Add '-f' support.
Add multiple '-b' support to override disabling of '-b' when '-f -' is used.
2024-11-07 13:03:52 +01:00
Ximon Eighteen 4a2bca8bd1 Move long help comments to after help to better match ldns-signzone. 2024-11-07 13:01:57 +01:00
Ximon Eighteen 76df433ad7 Cargo fmt. 2024-11-07 11:40:04 +01:00
Ximon Eighteen bb97b000fd Add long help for timestamp command line arguments indicating the supported formats. 2024-11-07 11:39:53 +01:00
Ximon Eighteen 6ec558f6bc Override the default origin command line argument shown value name. 2024-11-07 11:37:48 +01:00
Ximon Eighteen f1e3a465d4 Fix CLI help text for inception and expiration date, change the value name shown and show better default value text. 2024-11-07 11:35:24 +01:00
Ximon Eighteen fe7dbda14d Add inception and expiration command line argument support. 2024-11-07 11:30:08 +01:00
Ximon Eighteen 1f1b7efff5 Add a comment about spacing and compatibility. 2024-11-07 10:52:35 +01:00
Ximon Eighteen 581d4e612f Fix incorrect comment output: {{ was doubled to escape it when using write! but Stdout doesn't implement the required traits for write!. 2024-11-07 10:51:14 +01:00
Ximon Eighteen a886428c17 Caro fmt. 2024-11-07 10:17:38 +01:00
Ximon Eighteen 0d9289e105 Prepare to add missing ldns-signzone command line options. 2024-11-07 10:13:31 +01:00
Ximon Eighteen 0d1c7c33c7 Missing > bracket in comments. 2024-11-07 00:39:06 +01:00
Ximon Eighteen e860ec8c1b Clippy. 2024-11-07 00:38:00 +01:00
Ximon Eighteen 3de9a514e2 Clippy. 2024-11-07 00:30:18 +01:00
Ximon Eighteen 178f5546a8 Even closer -b output to that of ldns-signzone. 2024-11-07 00:27:03 +01:00
Ximon Eighteen 16cbd2218d Even closer -b output to that of ldns-signzone. 2024-11-06 23:56:20 +01:00
Ximon Eighteen b7a7ef3988 Even closer -b output to that of ldns-signzone. 2024-11-06 23:54:24 +01:00
Ximon Eighteen a433f4cc3c Update domain and align -b output more closely to that of ldns-signzone. 2024-11-06 23:47:17 +01:00
Ximon Eighteen c97a3aab99 Merge branch 'main' into add-ldns-like-sign-zone-support 2024-11-06 22:49:25 +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 Eighteen 52f390215e Cargo fmt. 2024-11-05 17:03:32 +01:00
Ximon Eighteen 54c8397aa0 Add missing blank line. 2024-11-05 17:01:26 +01:00
Ximon Eighteen bd7f9472fa Finish incomplete RustDoc comment. 2024-11-05 17:01:12 +01:00