GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: preserve provider serialization and prime-check behavior by boorad · Pull Request #54 · nodejs/ncrypto

Conversation

@boorad

@boorad boorad commented Oct 26, 2026

Copy link
Copy Markdown

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.

All reactions
@boorad
fix: preserve OpenSSL provider key behavior
a061669
Signed-off-by: Brad Anderson <[email protected]>
@panva

panva commented Oct 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

please propose any applicable changes in nodejs/node first

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@boorad boorad mentioned this pull request Oct 26, 2026
crypto: honor prime checks and support empty SEC1 passphrases nodejs/node#67039
Merged
@panva

panva commented Nov 9, 2026

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@boorad @panva
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.