Skip to content

Conversation

@deeglaze
Copy link
Collaborator

Copy link
Contributor

@setrofim setrofim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return alg, key, nil
}
switch v := key.(type) {
case *ecdsa.PrivateKey:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter bizarrely crashes around here with the error:

Error: corim/signer.go:156:7: previous case (typecheck)
	case *ecdsa.PrivateKey:
	     ^

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PrivateKey extends PublicKey in ecdsa, so maybe it doesn't like that they're both tested in the same switch. Even if it's legal to the Golang typechecker.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the attempt (9a86440). Unfortunately, we now have two errors rather than one :-)

Error: corim/signer.go:158:7: previous case (typecheck)
	case *ecdsa.PrivateKey:
	     ^
Error: corim/signer.go:169:7: previous case (typecheck)
	case *ecdsa.PublicKey:
	     ^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we use staticcheck instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created a PR to fix all the linter problems except the documentation lint that I can rebase on top of when it's merged.

The linter does not appear to like that ecdsa.PrivateKey contains an unnamed ecdsa.PublicKey.

Signed-off-by: Dionna Glaze <[email protected]>
@deeglaze deeglaze force-pushed the jwkpk branch 2 times, most recently from aee3d11 to e12b637 Compare June 17, 2025 19: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.

3 participants