Bun corpus slice
- Position 4035:
js/third_party/jsonwebtoken/wrong_alg.test.js
Gap
The suite reads pub.pem as UTF-8. It is an X.509 certificate, so source-path metadata is unavailable and Home currently classifies it as a symmetric secret. That permits an HS256 token to be checked against RSA certificate material instead of rejecting the algorithm confusion attempt.
Acceptance criteria
- classify PEM certificates as asymmetric RSA key material in the JWT path
- reject HS verification with certificate/public-key material
- preserve explicit algorithm allowlist rejection for RS/PS mismatches
- retain structured key/algorithm verification errors and operation stacks
- focused and permanent JWT matrices pass