Skip to content

Commit

Permalink
Add key type to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hslatman committed Dec 12, 2023
1 parent 7c490d1 commit b84beef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion token/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func WithNebulaCert(certFile string, anyKey any) Options {
key = []byte(k.Bytes())

Check failure on line 240 in token/options.go

View workflow job for this annotation

GitHub Actions / ci / lint / lint

unnecessary conversion (unconvert)
curve = nebula.Curve_P256
default:
return errors.Errorf("key content is not a valid nebula key")
return errors.Errorf("key content is not a valid nebula key; got type %T", anyKey)

Check warning on line 243 in token/options.go

View check run for this annotation

Codecov / codecov/patch

token/options.go#L242-L243

Added lines #L242 - L243 were not covered by tests
}

if err := crt.VerifyPrivateKey(curve, key); err != nil {
Expand Down

0 comments on commit b84beef

Please sign in to comment.