From 9c3665f0fc5e976128e595f9859894a2e8d78719 Mon Sep 17 00:00:00 2001 From: Alexander Yastrebov Date: Wed, 3 Nov 2021 14:14:30 +0100 Subject: [PATCH] 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 --- cmd/jwt/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/jwt/main.go b/cmd/jwt/main.go index 8b16b22..da48b49 100644 --- a/cmd/jwt/main.go +++ b/cmd/jwt/main.go @@ -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