Skip to content

Expect DNSKEY public keys as their bytes, for dns_erlang 6 - #54

Draft
NelsonVides wants to merge 3 commits into
mainfrom
dns-erlang-6
Draft

NelsonVides wants to merge 3 commits into
mainfrom
dns-erlang-6

Conversation

@NelsonVides

@NelsonVides NelsonVides commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

dns_erlang 6 keeps the public_key of a DNSKEY or CDNSKEY as the key field of its RDATA, as bytes (dnsimple/dns_erlang#184). 5.x decoded an RSA key from the wire into [E, M], and the expected CDNSKEY of minimal-dnssec.com built its key the same way through dnstest_harness:decode_dnskey_public_key/1, so it no longer matches what a server on dns_erlang 6 answers. decode_dnskey_public_key/1 now returns the key field's bytes.

compute_base64_key/1, which turned [E, M] back into base64, is gone. It was exported, but nothing called it, here or in erldns and erldnsimple.

This stays a draft until dns_erlang 6.0.0 is on hex. Until then, rebar.config takes dns_erlang from its main, so CI runs against dns_erlang 6. It pins the commit main is at (60db43f) rather than the branch, because elvis's no_branch_deps rule rejects branch dependencies. Once the release is out, the dependency goes back to ~> 6.0 and the lock follows with rebar3 upgrade dns_erlang.

erldnsimple follows main here and requires dns_erlang ~> 5.1, so it has to move to dns_erlang 6 in the same change that moves its mix.lock past this merge. erldns pins this repo by commit in its test profile, and its move to dns_erlang 6 should pin this branch's commit.

dns_erlang 6 keeps a DNSKEY's and CDNSKEY's public_key as the RDATA's key
field, where 5.x decoded an RSA key from the wire into [E, M]. The
expected CDNSKEY of minimal-dnssec.com built its key as [E, M] to match,
through decode_dnskey_public_key/1, which now returns the key field's
bytes.

compute_base64_key/1, which turned [E, M] back into base64 and which
nothing called, is gone.
@NelsonVides NelsonVides added the dependencies Pull requests that update a dependency file. label Nov 16, 2026
@NelsonVides NelsonVides self-assigned this Nov 16, 2026
With `~> 6.0` and no 6.0.0 on hex, rebar3 kept building from the 5.0.18
in rebar.lock without complaint, so nothing here ran against dns_erlang
6. Pin the commit dns_erlang's main is at instead: by ref, because
elvis's no_branch_deps rule rejects a branch.

Once 6.0.0 is on hex, the dependency goes back to `~> 6.0` and the lock
follows with `rebar3 upgrade dns_erlang`.
dns_erlang's main moved on to 60db43f, with #198 (zone file owners) and
#199 (signing only RRsets the signer's zone can hold). dnstest calls
neither dns_sec nor the zone file decoder, so nothing here changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant