-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
crypto: make generatePrime/checkPrime interruptible #56460
Open
jasnell
wants to merge
1
commit into
nodejs:main
Choose a base branch
from
jasnell:jasnell/crypto-prime-interrupt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+59
−11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review requested:
|
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
Jan 3, 2025
This comment was marked as outdated.
This comment was marked as outdated.
jasnell
force-pushed
the
jasnell/crypto-prime-interrupt
branch
from
January 3, 2025 23:56
66d4031
to
3483421
Compare
Shouldn't we add a test? I think the snippet in the linked issue seems to be ideal to validate whether the issue is actually fixed and detect regressions. |
anonrig
approved these changes
Jan 4, 2025
This comment was marked as outdated.
This comment was marked as outdated.
jasnell
force-pushed
the
jasnell/crypto-prime-interrupt
branch
2 times, most recently
from
January 4, 2025 02:08
5373306
to
0e78bfb
Compare
@aduh95 ... test added |
jasnell
added
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
and removed
needs-ci
PRs that need a full CI run.
labels
Jan 4, 2025
anonrig
approved these changes
Jan 4, 2025
mertcanaltin
approved these changes
Jan 4, 2025
aduh95
approved these changes
Jan 4, 2025
jasnell
force-pushed
the
jasnell/crypto-prime-interrupt
branch
from
January 4, 2025 15:32
0e78bfb
to
c06d35e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
aduh95
approved these changes
Jan 4, 2025
The `generatePrime` and `checkPrime` functions in the `crypto` module are only somewhat interruptible. This change makes it possible to interrupt these more reliably. Note that generating overly large primes can still take a long time and may not be interruptible as this mechanism relies on a callback to check for stopping conditions but OpenSSL may perform a long running operation without calling the callback right away. Fixes: nodejs#56449
jasnell
force-pushed
the
jasnell/crypto-prime-interrupt
branch
from
January 5, 2025 20:03
c06d35e
to
785f016
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
c++
Issues and PRs that require attention from people who are familiar with C++.
crypto
Issues and PRs related to the crypto subsystem.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
generatePrime
andcheckPrime
functions in thecrypto
module are only somewhat interruptible. This change makes it possible to interrupt these more reliably. Note that generating overly large primes can still take a long time and may not be interruptible as this mechanism relies on a callback to check for stopping conditions but OpenSSL may perform a long running operation without calling the callback right away.Fixes: #56449