From 41c8233533633cd9e5efd280ac7b6e041395a795 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Sun, 3 Dec 2023 22:02:52 +0100 Subject: [PATCH] fix: to_decoding_key should use to_public for RSA --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a0301f9..c5343f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -635,7 +635,8 @@ const _IMPL_JWT_CONVERSIONS: () = { .unwrap() } Self::RSA { .. } => { - jwt::DecodingKey::from_rsa_pem(self.to_pem().as_bytes()).unwrap() + jwt::DecodingKey::from_rsa_pem(self.to_public().unwrap().to_pem().as_bytes()) + .unwrap() } } }