Skip to content

Commit

Permalink
Fixes jwt command to support EdDSA algorithm (#118)
Browse files Browse the repository at this point in the history
Fixes
```
$ echo '{"foo":"bar"}' | jwt -key test/ed25519-private.pem -alg EdDSA -sign -
Error: error signing token: key is of invalid type
```

Signed-off-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
  • Loading branch information
AlexanderYastrebov committed Nov 3, 2021
1 parent a2aa655 commit 9c3665f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/jwt/main.go
Expand Up @@ -293,7 +293,7 @@ func isRs() bool {
}

func isEd() bool {
return strings.HasPrefix(strings.ToUpper(*flagAlg), "Ed")
return *flagAlg == "EdDSA"
}

type ArgList map[string]string
Expand Down

0 comments on commit 9c3665f

Please sign in to comment.