Skip to content

crypto,tls: do not ignore BN_get_word error#63895

Open
tniessen wants to merge 1 commit into
nodejs:mainfrom
tniessen:tls-fix-wrong-exponent
Open

crypto,tls: do not ignore BN_get_word error#63895
tniessen wants to merge 1 commit into
nodejs:mainfrom
tniessen:tls-fix-wrong-exponent

Conversation

@tniessen

Copy link
Copy Markdown
Member

This changes BignumPointer::GetWord such that it does not hide errors from the caller. In the context of RSA keys within X.509 certificates, we should eventually compute the public exponent correctly regardless of its size. This patch, however, is designed to be a minimal change that prevents callers from using erroneous return values of BN_get_word.

@tniessen tniessen added tls Issues and PRs related to the tls subsystem. crypto Issues and PRs related to the crypto subsystem. labels Jun 13, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jun 13, 2026
This changes `BignumPointer::GetWord` such that it does not hide errors
from the caller. In the context of RSA keys within X.509 certificates,
we should eventually compute the public exponent correctly regardless of
its size. This patch, however, is designed to be a minimal change that
prevents callers from using erroneous return values of `BN_get_word`.

Signed-off-by: Tobias Nießen <tniessen@tnie.de>
@tniessen tniessen force-pushed the tls-fix-wrong-exponent branch from 27df418 to 3c157c5 Compare June 13, 2026 19:44
@tniessen tniessen changed the title ncrypto,tls: do not ignore BN_get_word error crypto,tls: do not ignore BN_get_word error Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crypto Issues and PRs related to the crypto subsystem. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants