From e12d45b4f97441878c742cb2e1935d7149028f88 Mon Sep 17 00:00:00 2001 From: Joakim Antman Date: Sun, 15 Sep 2024 14:47:46 +0300 Subject: [PATCH] Don't require eddsa if rbnacl is not available --- lib/jwt/jwa.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/jwt/jwa.rb b/lib/jwt/jwa.rb index 8d515d26..8a975824 100644 --- a/lib/jwt/jwa.rb +++ b/lib/jwt/jwa.rb @@ -9,9 +9,7 @@ end require_relative 'jwa/signing_algorithm' - require_relative 'jwa/ecdsa' -require_relative 'jwa/eddsa' require_relative 'jwa/hmac' require_relative 'jwa/none' require_relative 'jwa/ps' @@ -19,6 +17,10 @@ require_relative 'jwa/unsupported' require_relative 'jwa/wrapper' +if JWT.rbnacl? + require_relative 'jwa/eddsa' +end + if JWT.rbnacl_6_or_greater? require_relative 'jwa/hmac_rbnacl' elsif JWT.rbnacl?