Skip to content

Commit

Permalink
Merge pull request duo-labs#59 from jonathanverner/fix/Issue-54-Fix-P…
Browse files Browse the repository at this point in the history
…S256-Salt-Length

Fix salt length for PS256 signatures (Fixes Issue duo-labs#54).
  • Loading branch information
Nick Mooney authored Jan 31, 2020
2 parents 93e070b + 68209bb commit 93ad0d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webauthn/webauthn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ def _verify_signature(public_key, alg, data, signature):
elif alg == COSE_ALG_RS256:
public_key.verify(signature, data, PKCS1v15(), SHA256())
elif alg == COSE_ALG_PS256:
padding = PSS(mgf=MGF1(SHA256()), salt_length=PSS.MAX_LENGTH)
padding = PSS(mgf=MGF1(SHA256()), salt_length=32)
public_key.verify(signature, data, padding, SHA256())
else:
raise NotImplementedError()

0 comments on commit 93ad0d2

Please sign in to comment.