doc: clarify PEM format for signing keys#64404
Merged
nodejs-github-bot merged 1 commit intoJul 15, 2026
Merged
Conversation
Signed-off-by: harjoth <harjoth.khara@gmail.com>
Collaborator
|
Review requested:
|
pimterry
approved these changes
Jul 10, 2026
lpinca
approved these changes
Jul 10, 2026
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/64404 ✔ Done loading data for nodejs/node/pull/64404 ----------------------------------- PR info ------------------------------------ Title doc: clarify PEM format for signing keys (#64404) Author Harjoth Khara <harjoth.khara@gmail.com> (@harjothkhara, first-time contributor) Branch harjothkhara:codex/doc-crypto-pem-keys -> nodejs:main Labels crypto, doc Commits 1 - doc: clarify PEM format for signing keys Committers 1 - harjoth <harjoth.khara@gmail.com> PR-URL: https://github.com/nodejs/node/pull/64404 Fixes: https://github.com/nodejs/node/issues/35331 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64404 Fixes: https://github.com/nodejs/node/issues/35331 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 10 Jul 2026 06:43:39 GMT ✔ Approvals: 2 ✔ - Tim Perry (@pimterry): https://github.com/nodejs/node/pull/64404#pullrequestreview-4670366516 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/64404#pullrequestreview-4674166183 ✘ 2 GitHub CI job(s) cancelled: ✘ - lint-pr-url: CANCELLED (https://github.com/nodejs/node/actions/runs/29074607456/job/86334929473) ✘ - lint-readme: CANCELLED (https://github.com/nodejs/node/actions/runs/29074607456/job/86334929515) ℹ Green GitHub CI is sufficient -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/29363329109 |
Member
|
Commit queue issue here is unrelated - it seems that switching draft to ready-to-review immediately after opening the PR confused some job statuses, I think I've cleaned it up so it'll work this time. |
Collaborator
|
Landed in 5d68eb4 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Clarify that bare string and buffer-source keys passed to the signing and
verification APIs must contain PEM-encoded key material.
This documents the behavior consistently for:
Sign#sign()Verify#verify()crypto.sign()crypto.verify()Structured key objects can continue to select other supported formats through
their
formatproperty.Fixes: #35331
Validation
node tools/lint-md/lint-md.mjs doc/api/crypto.mdmake doc-onlyArrayBuffer,Buffer,TypedArray, andDataViewPEM inputs, plus rejection of a bare DER inputDuplicate-work check
PR #63350 previously attempted similar wording for only
crypto.sign()andcrypto.verify(), then was withdrawn without review. This change covers allfour APIs identified in the issue discussion.