We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 201e4b1 commit ce65da1Copy full SHA for ce65da1
tests/test_algorithms.py
@@ -171,13 +171,12 @@ def test_ec_verify_should_return_false_if_signature_invalid(self):
171
172
jwt_message = ensure_bytes('Hello World!')
173
174
+ # Mess up the signature by replacing a known byte
175
jwt_sig = base64.b64decode(ensure_bytes(
176
'MIGIAkIB9vYz+inBL8aOTA4auYz/zVuig7TT1bQgKROIQX9YpViHkFa4DT5'
177
'5FuFKn9XzVlk90p6ldEj42DC9YecXHbC2t+cCQgCicY+8f3f/KCNtWK7cif'
178
'6vdsVwm6Lrjs0Ag6ZqCf+olN11hVt1qKBC4lXppqB1gNWEmNQaiz1z2QRyc'
- 'zJ8hSJmbw=='))
179
-
180
- jwt_sig += ensure_bytes('123') # Signature is now invalid
+ 'zJ8hSJmbw=='.replace('r', 's')))
181
182
with open(key_path('testkey_ec.pub'), 'r') as keyfile:
183
jwt_pub_key = algo.prepare_key(keyfile.read())
0 commit comments