Skip to content

[v24.x backport] crypto: support loading private keys through STORE loaders - #65426

Open
panva wants to merge 1 commit into
nodejs:v24.x-stagingfrom
panva:backport-63949-24.x
Open

[v24.x backport] crypto: support loading private keys through STORE loaders#65426
panva wants to merge 1 commit into
nodejs:v24.x-stagingfrom
panva:backport-63949-24.x

Conversation

@panva

@panva panva commented Aug 20, 2026

Copy link
Copy Markdown
Member

Backports #63949 to v24.x

Accept WHATWG URL objects in private-key inputs and load referenced keys
through OpenSSL STORE loaders. Pass optional property queries and
passphrases while preserving provider-owned EVP_PKEY objects for
ordinary KeyObject and CryptoKey operations.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: nodejs#63949
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/crypto
  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/url

@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. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch. labels Aug 20, 2026
Comment thread doc/api/cli.md
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 20, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.24116% with 77 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.27%. Comparing base (9e39360) to head (77845bd).
⚠️ Report is 8 commits behind head on v24.x-staging.

Files with missing lines Patch % Lines
src/crypto/crypto_keys.cc 56.97% 21 Missing and 16 partials ⚠️
src/crypto/crypto_sig.cc 58.75% 12 Missing and 21 partials ⚠️
lib/internal/crypto/keys.js 95.78% 4 Missing ⚠️
src/crypto/crypto_ec.cc 33.33% 0 Missing and 2 partials ⚠️
src/permission/openssl_store_permission.cc 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           v24.x-staging   #65426      +/-   ##
=================================================
- Coverage          90.31%   90.27%   -0.04%     
=================================================
  Files                711      713       +2     
  Lines             228425   228917     +492     
  Branches           43160    43254      +94     
=================================================
+ Hits              206293   206661     +368     
- Misses             14090    14109      +19     
- Partials            8042     8147     +105     
Files with missing lines Coverage Δ
lib/internal/process/permission.js 91.66% <100.00%> (-8.34%) ⬇️
lib/internal/process/pre_execution.js 98.32% <100.00%> (+0.65%) ⬆️
lib/internal/url.js 93.27% <100.00%> (+0.09%) ⬆️
src/crypto/crypto_cipher.cc 75.63% <100.00%> (+0.22%) ⬆️
src/crypto/crypto_keys.h 27.64% <ø> (ø)
src/env.cc 81.01% <100.00%> (+0.18%) ⬆️
src/node_options.cc 76.61% <100.00%> (+0.04%) ⬆️
src/node_options.h 97.94% <100.00%> (+0.02%) ⬆️
src/permission/openssl_store_permission.h 100.00% <100.00%> (ø)
src/permission/permission.cc 82.07% <100.00%> (+1.43%) ⬆️
... and 6 more

... and 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants