Skip to content

Commit 15b09f4

Browse files
author
Roland Hedberg
committed
DSASigner should behave as the other signers.
1 parent 8a757f7 commit 15b09f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/jwkest/jws.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ def sign(self, msg, key):
161161

162162
def verify(self, msg, sig, key):
163163
h = bytes_to_long(self.digest.new(msg).digest())
164-
return self._sign.verify(h, sig, key)
164+
if self._sign.verify(h, sig, key):
165+
return True
166+
else:
167+
raise BadSignature()
165168

166169

167170
class PSSSigner(Signer):

0 commit comments

Comments
 (0)