Skip to content

Commit

Permalink
fix: Handler errors in list of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Davis committed Sep 2, 2016
1 parent 2ac7f80 commit 6ae3175
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jose/jws.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ def _load(jwt):
def _sig_matches_keys(keys, signing_input, signature, alg):
for key in keys:
key = jwk.construct(key, alg)
if key.verify(signing_input, signature):
return True
try:
if key.verify(signing_input, signature):
return True
except:
pass
return False


Expand Down

0 comments on commit 6ae3175

Please sign in to comment.