Skip to content

handle RSA_R_INTERNAL_ERROR as a user-facing error#6314

Merged
anonrig merged 1 commit intomainfrom
yagiz/fix-rsa-error
Mar 13, 2026
Merged

handle RSA_R_INTERNAL_ERROR as a user-facing error#6314
anonrig merged 1 commit intomainfrom
yagiz/fix-rsa-error

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented Mar 12, 2026

Fixes a sentry issue

@anonrig anonrig requested a review from jasnell March 12, 2026 19:14
@anonrig anonrig requested review from a team as code owners March 12, 2026 19:14
@anonrig anonrig enabled auto-merge March 12, 2026 19:14
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 12, 2026

Let me try an alternative approach to understand when RSA_R_INTERNAL_ERROR fires. I know enough about BoringSSL to proceed with the review. In BoringSSL, RSA_R_INTERNAL_ERROR is typically raised in rsa_impl.c when:

  1. RSA blinding/unblinding fails
  2. The post-signing verification (ct check) fails
  3. Internal consistency checks fail during RSA private key operations

These are typically caused by corrupted or invalid key material provided by the user, making it appropriate to surface as a user-facing error rather than an internal error.

The change is clean and follows the established pattern exactly. Both throwOpensslError and consumeAllOpensslErrors are updated consistently, and a test is added that follows the same pattern as existing tests. No backward compatibility concerns since this only changes an internal error into a more descriptive user-facing error (strictly more informative, not a behavior change).

LGTM

github run

@anonrig anonrig force-pushed the yagiz/fix-rsa-error branch from 2147a17 to fcbe7c4 Compare March 12, 2026 22:57
@anonrig anonrig merged commit b3bb7cc into main Mar 13, 2026
22 of 24 checks passed
@anonrig anonrig deleted the yagiz/fix-rsa-error branch March 13, 2026 00:36
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