GeezerVison is showing github.com — fix: preserve provider serialization and prime-check behavior by boorad · Pull Request #54 · nodejs/ncrypto
Conversation
Fix three provider-backed behaviors:
- Allow an explicitly empty passphrase when writing encrypted SEC1 EC PEM, extending the helper already used for RSA PKCS#1.
- Preserve explicit EC parameter encoding during SPKI export. Oakley-EC2N-3/4 have valid explicit encodings despite lacking named-curve OIDs; named-curve exports without an OID remain rejected.
- Honor
BignumPointer::isPrime(nchecks) requests above the minimum performed by a single BN_check_prime() call. Repeat checks as needed and preserve callback cancellation/error propagation.
Regression tests cover RSA/EC PEM and DER round trips; binary, empty, missing, and incorrect passphrases; explicit EC SPKI re-export; and prime-check requests of 65/129 rounds plus callback cancellation.
Validation at a0616695e92f9889b8d2fd35f635eb00e1ca4e8b: OpenSSL 3.6.2 on macOS, CMake Release build with NCRYPTO_SHARED_LIBS=ON and NCRYPTO_TESTING=ON, followed by ctest --output-on-failure: 34/34 pass. Changed C++ files pass clang-format and git diff --check.
This PR is independent of the separate EVP-only build-profile proposal.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
panva
commented
Oct 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
please propose any applicable changes in nodejs/node first
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Landed in nodejs/node#67039, when consumers of ncrypto need to sync nodejs/node to nodejs/ncrypto there's a workflow for getting that going.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.