Commit Graph
1322 Commits
Author SHA1 Message Date
withjannisNLnetLabsandGitHub 6c9dbfc3a4 Extend Rcode & OptCode with to_mnemonic_str (#668)
* Extend `Rcode` & `OptCode` with `to_mnemonic_str`

The original idea was proposed by @rossmacarthur in PR #648.

I moved the match statement into the `to_mnemonic_str` to avoid the
unsafe block in @rossmacarthurs version and to implement it the same way
as the `int_enum` macro does.

* Update Changelog.

* Fix Changelog links
2026-06-02 15:02:37 +02:00
withjannisNLnetLabsandGitHub a8865eb57f Documentation with all and default features incl. CI (#672)
* Fix docs for no feature flag

* Added Github CI check with matrix strategy
2026-06-02 13:43:36 +02:00
arya dradjicaandarya dradjica dd149a0c81 [new/rdata] Optimize allocation in 'BoxedRecordData::from()' 2026-06-01 15:31:25 +00:00
arya dradjicaandGitHub 08189fcc55 Switch to Rust 2024 (#645)
Now that our MSRV is past 1.85, we can switch to the 2024 edition. This
changes some minor behavior in the language and exposes new lints (both
from check and clippy). In particular, unsafe functions now require
unsafe blocks to call other unsafe functions; this is quite a nice
change as it exposes more places where safety comments are needed.
2026-06-01 14:53:22 +02:00
Martin Hoffmann b9ea796ca2 Update changelog. 2026-05-29 14:18:47 +02:00
Martin HoffmannandGitHub 3fcaa68419 Release 0.12.1. (#667)
Improvements

* Implemented `core::error::Error` instead of `std::error::Error` for error
  types, reducing the need for the `std` feature flag. ([#641] by [@soywod])
* Added missing `impl core::Error for ParseError`. ([#650] by [@soywod])

Bug fixes

* Added a length check when parsing open-ended record types like
  `Dnskey<_>` which are supposed to never be too large. ([#664])
* Detect when an attempt is made to create a
  `dnssec::sign::records::Rrset` with records that have different TTLs.
  Unfortuantely error handling is poor so the code currently panics. At
  least this prevents bad signatures but the error handling needs to be
  fixed later. ([#660])

Unstable features

* `unstable-crypto`:
  * Added key generation and signing for RSASHA512. ([#659])
v0.12.1
2026-05-29 14:15:41 +02:00
Martin HoffmannandGitHub bbcbd52444 Update dependencies. (#666) 2026-05-29 14:02:29 +02:00
Martin Hoffmann 429c3aed5c Update changelog. 2026-05-29 13:41:30 +02:00
soywodandGitHub 6c4359cf08 Implement missing core::Error for ParseError (#650) 2026-05-29 12:48:49 +02:00
Skye SossandGitHub 59ad480368 Update EDNS(0) Update Lease comment to reflect new standard (#658)
The doc-comment on the Update Lease option mentioned a previous
draft standard that had since expired. RFC 9664 has been
standardized and now gives official meaning to EDNS(0) option,
and the comment is now updated to reflect that.
2026-05-29 12:47:35 +02:00
Martin HoffmannandGitHub f4a4dbf651 Check remaining length when parsing open-ended RDATA. (#664)
This PR adds checks to the parse functions of open-ended RDATA types to
make sure they will not exceed the maximum RDATA length of 65,535 bytes.

Specifically, these checks are added to all types that return an
error-result of LongRecordData in their new function. I hope that covers
all such types.
2026-05-29 12:44:45 +02:00
Philip Homburg e40b09a8cb Update ChangeLog and fix spelling error in string. 2026-05-28 10:26:33 +02:00
Philip-NLnetLabsandGitHub da907f56f3 Panic when trying to create an RRset with records that have diffferent TTLs. (#660) 2026-05-28 10:21:25 +02:00
withjannisNLnetLabsandGitHub b311ad66ba Fix deserialize and add testing for the base::iana enums (#662)
* Added tests for iana types and deserialize fix

* Error handling for big numbers and testing for it
2026-05-28 10:04:05 +02:00
Philip Homburg 0019d0759c Update ChangeLog. 2026-05-21 12:13:26 +02:00
Philip-NLnetLabsandGitHub 80cf91e7d1 Key generation a signing for RSASHA512. (#659) 2026-05-21 12:10:06 +02:00
Ximon Eighteen f538651bf9 Revert "Fix SecurityAlgorithm to parse int and mnemonic (#656)"
This reverts commit 3f41239e9b.
2026-05-21 10:33:21 +02:00
Ximon Eighteen 4b669c00ff Revert "Update changelog."
This reverts commit c7593ee508.
2026-05-21 10:33:18 +02:00
withjannisNLnetLabsandGitHub 1a3e134368 Improve documentation with examples, clarifications and pipeline (#655)
* Added pipeline check for `cargo doc`
* Added clarifications for `new::base::name::RevName`
* Added example usage for `new::base::Record` and `new::base::name`
* Cleaned up documentation including warnings
2026-05-13 11:43:46 +02:00
Martin Hoffmann c7593ee508 Update changelog. 2026-05-11 15:29:39 +02:00
withjannisNLnetLabsandGitHub 3f41239e9b Fix SecurityAlgorithm to parse int and mnemonic (#656)
This PR fixes loading of zones that contain a SecurityAlgorithm given as
a mnemonic rather than a number as mandated by RFC 4034.
2026-05-11 15:27:52 +02:00
withjannisNLnetLabsandGitHub a6bb69ea57 fix double reference warning suggested by clippy (#652) 2026-05-05 10:05:03 +02:00
withjannisNLnetLabsandGitHub 29779bb6fd fixed typo in line doc comment (#651) 2026-05-04 21:00:36 +02:00
arya dradjica 06d0c57543 [CI] allow 'required-features' of examples to be omitted
I noticed this in <https://github.com/NLnetLabs/daemonbase/pull/21>,
where I had copied 'domain's CI workflow. It has an example that is not
mentioned in 'Cargo.toml' and thus does not have a 'required-features';
this was breaking the 'jq' extraction used in CI. I'm pre-emptively
fixing this in 'domain' to avoid strange CI failures in the future.
2026-04-29 15:55:05 +02:00
arya dradjica 0f09ea9d19 Update Changelog (for #641) 2026-04-29 11:26:31 +02:00
Clément DOUINandGitHub 1646a781eb Alloc + no_std: part 1 (#641)
* Replace all std::error by core::error

* Revert no_std and alloc changes on lib.rs
2026-04-29 09:21:34 +00:00
Martin Hoffmann 6c3f041078 Update changelog. 2026-04-23 15:58:23 +02:00
Martin HoffmannandGitHub eb383a7f07 Release 0.12.0. (#643)
Breaking changes

* Added new `LimitExceeded` variant to `MessageBuilder`'s `PushError`.
  ([#349])
* Changed the `Resolver` and `SearchNames` traits of the stub resolver to
  use lifetimes for associated types. This makes it easier to keep the stub
  resolver behind an arc or other smart pointer. ([#596])

New

* Added `rdata::dnssec::Timestamp::to_system_time` to help sorting timestamps.
  ([#548])
* Added support for the `TLSA`, `OPENPGPKEY`, `SSHFP`, and `IPSECKEY`
  record types and added presentation format support for the `SVCB`/`HTTPS`
  record types. ([#569])
* Added support for the `CAA` record type. ([#434] by [@weilence])
* Added `FreezeBuilder` to the message compressors. ([#601] by
  [@rossmacarthur])
* Added support for the `RP` record type. ([#620])
* Added a position counter to the zonefile parser, available via
  `Zonefile::current_offset`. ([#642])

Improvements

* Excluded `moka` dependency from the `resolv` feature, reducing the number
  of dependencies and compile time significantly. ([#575] by [@WhyNotHugo])
* Made various methods in `RelativeName` into const fns. ([#576] by
  [@WhyNotHugo])

Bug fixes

* When parsing a Bind-style public key file, allow an optional TTL field.
  ([#593])
* `XfrMiddlewareService` should always support at least one concurrent XFR.
  ([#599])
* Fixed generating an ED448 keypair. ([#608])

Unstable features

* `unstable-crypto-sign`
  * Added support for RSA/SHA-512 to openssl signer. ([#550])
  * `generate` now takes `&GenerateParams`. This breaks existing uses of
    `generate` ([#608])
* `unstable-server-transport`
  * Return an error response when a `Service` returns a `ServiceError`.
    ([#390])
  * Implemented `std::error::Error` for `ServiceError`. ([#570] by
    [@rossmacarthur])
  * Be more lenient when timing out connections while they are in a
    transaction. ([#399])
  * Removed defaults for type arguments to prevent intermediate types that
    impl the trait from not allowing the defaults to be overridden.
    ([#484])
  * Added commonly required bounds to the `Service` trait rather than
    leaving them to the impl. ([#484])
  * Removed unnecessary `?Sized` bound on `impl Service for U where U: Deref`.
    ([#484])
* `unstable-sign`
   * keyset improvements ([#551])
     * Store the algorithm and key tag of a key to be able to reject duplicate
       key tags and accidental algorithm rolls.
     * Store whether a key is considered available for a key roll. Rolls with
       new keys that are not available are rejected.
     * Added two alternative key rolls for KSK and ZSK key rolls.
     * Added an algorithm roll.
     * Added more operations on UnixTime.
     * Added more actions
     * Allow loading public keys only. ([#594])
     * Added support for decoupled keys. ([#594])
   * `RecordsIter::new` has been replaced with `RecordsIter::new_from_owned`.
     There is a new `RecordsIter::new_from_refs` that takes a `&[&Record]]`.
     This breaks existing uses of `RecordsIter? and related types. ([#614])
* `unstable-xfr`
  * Various fixes and improvements. ([#507])

Other changes

* Dependency upgrades:
  * [hashbrown] to 0.17, ([#633])
  * [heapless] to 0.9, ([#634])
  * [octseq] to 0.6, ([#634])
  * [rand] to 0.10. ([#631])
v0.12.0
2026-04-23 15:53:52 +02:00
Martin Hoffmann c2e780da21 Merge branch 'main' of github.com:NLnetLabs/domain 2026-04-23 11:16:42 +02:00
Martin Hoffmann 9ba73abd31 Update changelog. 2026-04-23 11:16:26 +02:00
Terts DiepraamandGitHub beb8ef94a6 Expose current offset in zonefile parser (#642) 2026-04-23 10:55:50 +02:00
arya dradjicaandarya dradjica 383046b75b [new/base] Expand 'QType' and 'RType' 2026-04-21 13:04:32 +00:00
arya dradjicaandarya dradjica b76e860646 [new/rdata] Add 'Rp' 2026-04-21 13:04:32 +00:00
arya dradjicaandarya dradjica 67a981807c [new/rdata] Fix minor typos 2026-04-21 13:04:32 +00:00
arya dradjicaandarya dradjica d530111872 [new] Use one-space periods in docs for consistency 2026-04-21 13:04:32 +00:00
arya dradjicaandarya dradjica 48a003a317 [new/rdata] Add 'ZoneMD' 2026-04-21 13:04:32 +00:00
arya dradjicaandarya dradjica 75624dc486 [macros] Remove type defaults from impl block generics
Caught while defining 'ZoneMD'.
2026-04-21 13:04:32 +00:00
arya dradjicaandarya dradjica 1c096351a3 [new/base/name/absolute] Allow parsing whole inputs to 'FromStr' 2026-04-21 12:44:18 +00:00
arya dradjicaandarya dradjica 2ce00cb2e9 Resolve minor lints 2026-04-21 12:44:18 +00:00
arya dradjicaandarya dradjica e660f5f11c [new/base/name] Impl 'serde' conversions
- Also enhance 'FromStr' impls to parse more of the zonefile format,
  for parity with the existing 'Display' impls

- Also impl conversions between 'NameBuf' and 'RevNameBuf'
2026-04-21 12:44:18 +00:00
arya dradjicaandarya dradjica afc422f9f4 [new/rdata] Implement 'DName' 2026-04-21 12:44:18 +00:00
arya dradjicaandGitHub 8b4f8bf4da Overhaul feature flags for DNSSEC / crypto (#553)
- 'ring' and 'openssl' now enable a shared 'unstable-crypto-backend'
  feature, which is used internally to test whether a common backend is
  available.

- Examples / doc tests in 'crypto', relying on 'crypto::common', have
  been moved to the submodule to avoid needing more 'cfg' magic.

- 'unstable-crypto' now enables 'std'; this requirement was previously
  undetected (and the CI will be adjusted to try to catch more of these
  over time), but compilation would fail without it.

- 'unstable-sign' and 'unstable-validator' now fail to compile if
  'ring' and/or 'openssl' are not enabled.  Previously, those modules
  would remain configured out.  Its status as a breaking change is
  debatable, but in any case it only affects unstable features.
2026-04-21 11:01:22 +02:00
arya dradjicaandGitHub 35fd69c51d Use jiff instead of time (#616)
jiff is a popular time library which is taking over the ecosystem. It's
easier to use (as you can see from the diff) and it doesn't pull in any
dependencies. We're using jiff in other places too (e.g. Cascade), so
this change helps clean up our dependency tree.
2026-04-21 10:40:23 +02:00
Martin HoffmannandGitHub b969a99712 Use workspace.package section to sync settings of domain and domain-macros. (#639) 2026-04-21 09:56:44 +02:00
arya dradjicaandGitHub 02829f5474 [ci] Avoid stale cache entries and improve MSRV caching (#638)
It turns out that GitHub Actions cache entries are immutable; the
cache saving action refuses to overwrite an existing cache entry with
a particular ID. The simplest workaround, implemented here, is to add a
unique suffix to the cache entry being saved; cache restore actions will
no longer find an exact match, but GitHub falls back to using the most
recent cache entry whose key partially matches.

We store the _ideal_ dependency versions in 'Cargo.lock', which are not
necessarily compatible with our MSRV. To improve caching, we store a
'Cargo.lock' with MSRV-compatible dependency versions (while building
caches for the MSRV). We don't want to use the cached 'Cargo.lock' all
the time, as we want to test changes to 'Cargo.lock'; but those changes
are only relevant to our target Rust version, not the MSRV.
2026-04-21 09:35:39 +02:00
arya dradjicaandarya dradjica b0754cc9a2 [new/base/name] Allow nearby name compression refs 2026-04-20 15:23:22 +00:00
Martin HoffmannandGitHub 1d10bb6300 Update dependencies. (#637)
This PR updates all non-user visible dependencies.

It also makes a slight change to the CI workflow to make it compatible
with our Minimal Supported Rust Version policy.
2026-04-20 16:59:29 +02:00
Martin HoffmannandGitHub a4fe3aa56a Update heapless to 0.9.2 and octseq to 0.6.0. (#634) 2026-04-20 14:06:30 +02:00
Martin HoffmannandGitHub fc3d4340d1 Update MSRV to 1.87. (#635) 2026-04-20 13:59:51 +02:00
Martin HoffmannandGitHub 3bcd7ce56c Upgrade hashbrown to 0.17.0. (#633) 2026-04-20 12:06:29 +02:00