Skip to content

Commit

Permalink
crypto: make DH error messages consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen committed Feb 19, 2020
1 parent b8e4177 commit 505f3e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 505f3e8

Please sign in to comment.