Skip to content

Release 1.7.0: complete the secDNS (DNSSEC) extension per RFC 5910 - #61

Merged
ademar merged 1 commit into
masterfrom
fix/secdns-rfc5910
Sep 25, 2026
Merged

ademar merged 1 commit into
masterfrom
fix/secdns-rfc5910

Conversation

@ademar

@ademar ademar commented Sep 25, 2026

Copy link
Copy Markdown
Member

Fixes #31.

Summary

The secDNS extension only handled dsData. This adds the rest of RFC 5910:

  • keyData: new SecDNSKeyData. It works on its own (SecDNSCreate.KeyData, SecDNSUpdate.KeyDataToAdd/KeyDataToRemove) or inside a DS record (SecDNSData.KeyData).
  • Update options:
    • RemoveAll (<secDNS:rem><secDNS:all>)
    • MaxSigLife (<secDNS:chg>)
    • Urgent (the urgent attribute)
  • Schema rules enforced: RFC 5910 lets a request use DS data or key data but not both, and only one kind of removal. Mixing them now throws InvalidOperationException instead of producing XML the registry would reject.
  • Reading DNSSEC data: SecDNSInfData.FromResponse(response) reads secDNS:infData from any domain info response, including NominetDomainInfoResponse and IisDomainInfoResponse. It returns null when a response has none.
  • maxSigLife on create, which the issue lists, was already supported.

Bugs found along the way

  • SecDNSData.KeyTag was a short, but key tags run from 0 to 65535, so about half of real keys couldn't be sent. It's now an int. Existing code like KeyTag = 12345 still compiles; code that reads KeyTag into a short won't.
  • digestType was hard-coded to 1 (SHA-1). The new DigestType property accepts SHA256 and others. The default stays SHA1 so existing callers send the same XML.
  • SecDNSAlgorithm stopped at algorithm 5. It now names 6–8, 10 and 12–16, including RSASHA256 (8), ECDSAP256SHA256 (13) and ED25519 (15).

Version bumped to 1.7.0. The KeyTag type change breaks binary compatibility, so callers need to recompile.

Testing

  • New tests follow the RFC 5910 examples:
    • create with dsData plus keyData
    • create with keyData only
    • an urgent update that removes all DNSSEC data, adds a DS record and changes maxSigLife
    • updates that add and remove keyData
    • an update that only changes maxSigLife
    • info responses with DS data, with key data, and with none
  • Every generated secDNS element is validated against secDNS-1.1.xsd, which the test project now copies to its output directory.
  • Also covered: key tag 65535 with SHA-256 and algorithm 13, and both mixing errors.
  • The two existing exact-XML tests pass unchanged.
  • 68 passed, 22 skipped, in UTC and Asia/Tokyo.

🤖 Generated with Claude Code

Fixes #31. SecDNSCreate and SecDNSUpdate only handled dsData.

- keyData: SecDNSKeyData, usable on its own (create KeyData, update
  KeyDataToAdd/KeyDataToRemove) or inside a dsData (SecDNSData.KeyData).
- SecDNSUpdate: RemoveAll (rem/all), MaxSigLife (chg), Urgent.
  The schema's choices (dsData or keyData, one kind of rem) are
  enforced with InvalidOperationException.
- SecDNSInfData.FromResponse reads secDNS:infData from any domain info
  response, including the Nominet and IIS subclasses.
- SecDNSData.KeyTag is now an int: key tags run to 65535 and a short
  could not hold half of them. DigestType can be set (default stays
  SHA1 for compatibility; digestType was hard-coded to 1).
- SecDNSAlgorithm names current algorithms (RSASHA256, ECDSAP256SHA256,
  ED25519 and others).

Tests follow the RFC 5910 examples and validate the generated XML
against secDNS-1.1.xsd. Bump to 1.7.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ademar
ademar merged commit 3ccbef4 into master Sep 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EppLib secDNS (DNSSEC) extension not handling all elements in RFC

1 participant