crypto: align verifyOneShot accepted types#63280
Merged
nodejs-github-bot merged 1 commit intoMay 19, 2026
Merged
Conversation
Collaborator
|
Review requested:
|
4e06ba8 to
994a54a
Compare
Signed-off-by: anshikakalpana <anshikajain196872@gmail.com>
994a54a to
08427d7
Compare
panva
approved these changes
May 13, 2026
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63280 +/- ##
==========================================
+ Coverage 90.03% 90.05% +0.01%
==========================================
Files 714 714
Lines 225242 225228 -14
Branches 42579 42569 -10
==========================================
+ Hits 202804 202820 +16
+ Misses 14238 14174 -64
- Partials 8200 8234 +34
🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
aduh95
approved these changes
May 19, 2026
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/63280 ✔ Done loading data for nodejs/node/pull/63280 ----------------------------------- PR info ------------------------------------ Title crypto: align verifyOneShot accepted types (#63280) Author Anshika Jain <anshikajain196872@gmail.com> (@Anshikakalpana) Branch Anshikakalpana:crypto-verify-types-fix -> nodejs:main Labels crypto, author ready, needs-ci, commit-queue-squash Commits 1 - crypto: align verifyOneShot accepted types Committers 1 - anshikakalpana <anshikajain196872@gmail.com> PR-URL: https://github.com/nodejs/node/pull/63280 Fixes: https://github.com/nodejs/node/issues/62903 Fixes: https://github.com/nodejs/node/pull/63268 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/63280 Fixes: https://github.com/nodejs/node/issues/62903 Fixes: https://github.com/nodejs/node/pull/63268 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Wed, 13 May 2026 08:31:29 GMT ✔ Approvals: 2 ✔ - Filip Skokan (@panva) (TSC): https://github.com/nodejs/node/pull/63280#pullrequestreview-4280400076 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/63280#pullrequestreview-4319982878 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-05-15T21:29:34Z: https://ci.nodejs.org/job/node-test-pull-request/73478/ - Querying data for job/node-test-pull-request/73478/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD 216718affc..f352556da8 main -> origin/main ✔ origin/main is now up-to-date main is out of sync with origin/main. Mismatched commits: - ec139d19a4 stream: disallow writing string chunk with 'buffer' encoding - f352556da8 stream: disallow writing string chunk with 'buffer' encoding -------------------------------------------------------------------------------- HEAD is now at f352556da8 stream: disallow writing string chunk with 'buffer' encoding ✔ Reset to origin/main - Downloading patch for 63280 From https://github.com/nodejs/node * branch refs/pull/63280/merge -> FETCH_HEAD ✔ Fetched commits as 2ebf53330dde..08427d738ec9 -------------------------------------------------------------------------------- [main 91d66a655a] crypto: align verifyOneShot accepted types Author: anshikakalpana <anshikajain196872@gmail.com> Date: Wed May 13 00:17:20 2026 +0530 3 files changed, 42 insertions(+), 20 deletions(-) ✔ Patches applied -------------------------------------------------------------------------------- --------------------------------- New Message ---------------------------------- crypto: align verifyOneShot accepted typeshttps://github.com/nodejs/node/actions/runs/26108465715 |
Collaborator
|
Landed in 7acaa0f |
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.
Align crypto.verify() accepted types with crypto.sign()
crypto.sign() accepts ArrayBuffer and SharedArrayBuffer for
data, but crypto.verify() rejected them with ERR_INVALID_ARG_TYPE. Two issues in verifyOneShot():A redundant isArrayBufferView(data) check after getArrayBufferOrView() was incorrectly rejecting ArrayBuffer and SharedArrayBuffer — getArrayBufferOrView() already handles validation and normalization.
signaturehad only an isArrayBufferView() check with no prior getArrayBufferOrView() call, so ArrayBuffer and SharedArrayBuffer were rejected there too.Fix both by aligning verifyOneShot() with the signOneShot() pattern. Update docs and add test coverage for the affected types.
Fixes: #62903