vectors: add a case for unknown algorithm in actor doc #5
Labels
No labels
needs-triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
arne/msg#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
pkg/msg/actor_cache.gorejects an actor-doc key whosealgorithmfield isn't"ed25519"(return errf(ErrUnknownKey, "unsupported algorithm: ...")), but no normative test vector exercises this path. If a future refactor accidentally accepted any algorithm value, no vector would catch it.Proposal
Add a vector to
testdata/vectors/:algorithm: "rsa-pss"(or any non-ed25519 string)expect:unknown-keyNote: the existing vector format passes
publicKeydirectly into the verifier and skips the actor-cache lookup, so this requires either:(a) extending the vector schema with an optional
actorDocfield, or(b) adding a separate vector file format dedicated to actor-cache resolution paths.
(a) is simpler —
actorDocoverrides the bare-publicKeyshortcut when present.Acceptance criteria
testdata/vectors/(e.g.08-unknown-algorithm.json)pkg/msg.VerifyEnvelope(or its actor-cache-aware sibling) reaches the unknown-algorithm rejection pathunknown-keyfor this vectorcmd/gen-vectorsregenerates the new file deterministicallyContext
Surfaced in the v1.0.0 self-review (test-coverage gap, item #12). Spec-discipline maintenance work.