Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4ba8977

Browse filesBrowse files
tniessenMylesBorins
authored andcommitted
crypto: simplify error handling in ECDH::New
The type of the argument is being checked within JS which makes the type checking in C++ unnecessary. PR-URL: #23647 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent f5cadf6 commit 4ba8977
Copy full SHA for 4ba8977

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4352,7 +4352,7 @@ void ECDH::New(const FunctionCallbackInfo<Value>& args) {
43524352
MarkPopErrorOnReturn mark_pop_error_on_return;
43534353

43544354
// TODO(indutny): Support raw curves?
4355-
THROW_AND_RETURN_IF_NOT_STRING(env, args[0], "ECDH curve name");
4355+
CHECK(args[0]->IsString());
43564356
node::Utf8Value curve(env->isolate(), args[0]);
43574357

43584358
int nid = OBJ_sn2nid(*curve);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.