Commit 461eb1a
test(smart-account): fix webauthn verification test double-hashing
The test signed `SHA256(authenticatorData || SHA256(clientDataJSON))`,
then passed that prehash to `p256_sk.sign()` — which SHA-256s again via
the Signer trait, producing SHA-256(SHA-256(...)). Neither verification
path in verify_webauthn expects a double-hashed signature, so the test
failed regardless of the verification code being correct.
Fix: pass the raw `signed_data` concatenation to sign(), matching how a
real WebAuthn authenticator produces the signature. All other webauthn
tests already used this pattern.
Production verify_webauthn is unchanged — it was already correct.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 826e2a2 commit 461eb1a
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | | - | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1649 | 1652 | | |
1650 | 1653 | | |
1651 | 1654 | | |
1652 | 1655 | | |
1653 | | - | |
1654 | 1656 | | |
1655 | | - | |
1656 | | - | |
| 1657 | + | |
| 1658 | + | |
1657 | 1659 | | |
1658 | 1660 | | |
1659 | 1661 | | |
| |||
0 commit comments