aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-09-29 23:17:42 +0100
committerMatthew Wild <mwild1@gmail.com>2022-09-29 23:17:42 +0100
commit5ca81b0e3bcef02ebf6e518e10a855c6ed3efd7f (patch)
treed4bb945532b4b7f8f4d48baaf5f2c4b2e80c0cea /util
parent8695a72a668fa38f1df64653508c360534e5e3db (diff)
downloadprosody-5ca81b0e3bcef02ebf6e518e10a855c6ed3efd7f.tar.gz
prosody-5ca81b0e3bcef02ebf6e518e10a855c6ed3efd7f.zip
util.jwt: Add support for ES512 (+ tests)
Diffstat (limited to 'util')
-rw-r--r--util/jwt.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/jwt.lua b/util/jwt.lua
index 1c7daf12..0c878efb 100644
--- a/util/jwt.lua
+++ b/util/jwt.lua
@@ -150,6 +150,7 @@ end
local algorithms = {
HS256 = new_hmac_algorithm("HS256"), HS384 = new_hmac_algorithm("HS384"), HS512 = new_hmac_algorithm("HS512");
ES256 = new_ecdsa_algorithm("ES256", crypto.ecdsa_sha256_sign, crypto.ecdsa_sha256_verify, 32);
+ ES512 = new_ecdsa_algorithm("ES512", crypto.ecdsa_sha512_sign, crypto.ecdsa_sha512_verify, 66);
RS256 = new_rsa_algorithm("RS256"), RS384 = new_rsa_algorithm("RS384"), RS512 = new_rsa_algorithm("RS512");
PS256 = new_rsa_algorithm("PS256"), PS384 = new_rsa_algorithm("PS384"), PS512 = new_rsa_algorithm("PS512");
};