Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crypto-rsa code #57572

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AmitPrajapati-1
Copy link

No description provided.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Mar 21, 2025
Copy link
Member

@panva panva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not fix the underlying issue introduced somewhere in the ncrypto refactors. Checking that all bytes are 0 and then returning a zero-byte buffer is not a fix to the issue and it introduces more edge cases than it solves. i.e. an n-byte empty buffer will now always return 0-byte buffer.

#57553 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove this?

@AmitPrajapati-1
Copy link
Author

rather than converting empty string. we can Throwing appropriate errors with meaningful messages instead of trying to handle empty strings by returning zero-byte buffers.

@AmitPrajapati-1 AmitPrajapati-1 requested a review from panva March 21, 2025 08:58
Copy link
Member

@panva panva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My original review stands.

@panva
Copy link
Member

panva commented Mar 21, 2025

Fix in #57575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants