Skip to content

fix: use Algorithm method if keySet has one#82

Open
DrJosh9000 wants to merge 1 commit into
mainfrom
fix-use-keyset-algorithm
Open

fix: use Algorithm method if keySet has one#82
DrJosh9000 wants to merge 1 commit into
mainfrom
fix-use-keyset-algorithm

Conversation

@DrJosh9000
Copy link
Copy Markdown
Contributor

What

When verifying a signature, if the provided keySet is a crypto.Signer that satisfies Key, then call the Algorithm method to determine the alg parameter.

Why

The key might use an algorithm that isn't ES256. If the signature is made with a different algorithm than ES256, then verifying with the same key later on will fail.

https://slopcannon.tail952194.ts.net/lachlan/deepsec-buildkite-agent/HIGH_BUG/agent-other-algorithm-mismatch-bf08a85508.md

Disclosures

Found by deepsec, but fixed by me.

@DrJosh9000 DrJosh9000 enabled auto-merge May 25, 2026 05:25
@DrJosh9000 DrJosh9000 requested review from a team May 25, 2026 05:37
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