crypto: align verifyOneShot accepted types#63280
Open
Anshikakalpana wants to merge 1 commit into
Open
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
Collaborator
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:
|
Collaborator
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
Closes: #63268