Skip to content

Commit 9c3665f

Browse files
Fixes jwt command to support EdDSA algorithm (#118)
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 <[email protected]>
1 parent a2aa655 commit 9c3665f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/jwt/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ func isRs() bool {
293293
}
294294

295295
func isEd() bool {
296-
return strings.HasPrefix(strings.ToUpper(*flagAlg), "Ed")
296+
return *flagAlg == "EdDSA"
297297
}
298298

299299
type ArgList map[string]string

0 commit comments

Comments
 (0)