Skip to content

feat: RFC 9530 dictionary parsing and sha-512 Content-Digest support - #7

Merged
marcofanti merged 1 commit into
mainfrom
sha512-content-digest
Aug 3, 2026
Merged

feat: RFC 9530 dictionary parsing and sha-512 Content-Digest support#7
marcofanti merged 1 commit into
mainfrom
sha512-content-digest

Conversation

@marcofanti

Copy link
Copy Markdown
Owner

Closes the sha-512 deferral: the resource role's body-digest check now parses Content-Digest as the RFC 9530 dictionary it is, instead of comparing against a single recomputed sha-256 string.

  • SignatureBase.contentDigest(body, algorithm) overload for sha-256/sha-512 (sha-512 verified against the RFC 9530 test vector).
  • SignatureBase.verifyContentDigest(header, body) — every recognized member must match; result is MATCH / MISMATCH / NO_SUPPORTED_ALGORITHM.
  • RequestVerifier maps NO_SUPPORTED_ALGORITHM to a distinct unsupported content-digest algorithm failure (fail closed), MISMATCH to the existing content-digest mismatch.

Tests: sha-512 vector, multi-algorithm dictionaries, partial-mismatch dictionaries, unknown-only headers, plus resource-role acceptance/rejection paths. Full mvn verify green.

🤖 Generated with Claude Code

@marcofanti
marcofanti merged commit 9ff1d5f into main Aug 3, 2026
1 check passed
@marcofanti
marcofanti deleted the sha512-content-digest branch August 3, 2026 03:01
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.

1 participant