Skip to content

fix: sign RSA-PSS with one-shot crypto.sign - #63

Merged
jakelacey2012 merged 2 commits into
auth0:masterfrom
cyx:fix-pss-sign-fips
Nov 26, 2026
Merged

jakelacey2012 merged 2 commits into
auth0:masterfrom
cyx:fix-pss-sign-fips

Conversation

@cyx

@cyx cyx commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Description

The OpenSSL FIPS provider rejects RSA-PSS through createSign().sign(), which signs a precomputed digest, with "error:1C80007A:Provider routines::invalid digest". One-shot crypto.sign() is accepted and produces the same PSS signature. Fall back to createSign() where crypto.sign() is not available.

Also spread a { key, passphrase } private key into the sign options: crypto rejects it nested under key, so PS* signing with a passphrase never worked.

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • [-] I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@cyx
cyx requested a review from a team as a code owner November 18, 2026 22:54
cyx and others added 2 commits November 26, 2026 10:06
The OpenSSL FIPS provider rejects RSA-PSS through createSign().sign(),
which signs a precomputed digest, with "error:1C80007A:Provider
routines::invalid digest". One-shot crypto.sign() is accepted and
produces the same PSS signature. Fall back to createSign() where
crypto.sign() is not available.

Also spread a { key, passphrase } private key into the sign options:
crypto rejects it nested under `key`, so PS* signing with a passphrase
never worked.

Co-Authored-By: Claude <noreply@anthropic.com>
isKeyOptions treated a CryptoKey as a { key, passphrase } object, so PS*
signing with one threw. Only spread objects that carry a `key` property.

Co-Authored-By: Claude <noreply@anthropic.com>
@cyx
cyx force-pushed the fix-pss-sign-fips branch from 255513e to ee307a8 Compare November 26, 2026 18:07
@jakelacey2012
jakelacey2012 merged commit 1d897d3 into auth0:master Nov 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants