Skip to content

Commit 26eda64

Browse files
author
Michael Davis
authored
Merge pull request #34 from mpdavis/errors-in-list-of-keys
fix: Handler errors in list of keys
2 parents 2ac7f80 + 6ae3175 commit 26eda64

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

jose/jws.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ def _load(jwt):
208208
def _sig_matches_keys(keys, signing_input, signature, alg):
209209
for key in keys:
210210
key = jwk.construct(key, alg)
211-
if key.verify(signing_input, signature):
212-
return True
211+
try:
212+
if key.verify(signing_input, signature):
213+
return True
214+
except:
215+
pass
213216
return False
214217

215218

0 commit comments

Comments
 (0)