Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
crypto: make DH error messages consistent
Refs: #31178
Refs: #31445
  • Loading branch information
tniessen committed Feb 19, 2020
commit 505f3e864ce03fae3c50320a266e516678d05028
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5690,7 +5690,7 @@ void DiffieHellman::DiffieHellmanGroup(
const node::Utf8Value group_name(env->isolate(), args[0]);
const modp_group* group = FindDiffieHellmanGroup(*group_name);
if (group == nullptr)
return THROW_ERR_CRYPTO_UNKNOWN_DH_GROUP(env, "Unknown group");
return THROW_ERR_CRYPTO_UNKNOWN_DH_GROUP(env);

initialized = diffieHellman->Init(group->prime,
group->prime_size,
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-dh.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ assert.throws(
{
name: 'Error',
code: 'ERR_CRYPTO_UNKNOWN_DH_GROUP',
message: 'Unknown group'
message: 'Unknown DH group'
},
'crypto.getDiffieHellman(\'unknown-group\') ' +
'failed to throw the expected error.'
Expand Down