Skip to content
Prev Previous commit
fixup! src: throw ERR_INVALID_ARG_VALUE in node_crypto.cc
  • Loading branch information
joyeecheung committed Apr 18, 2018
commit 60a0c3618bc4cc41c0bc2215e1b90d254b0c2131
6 changes: 3 additions & 3 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo<Value>& args) {
DH_get0_pqg(dh, &p, nullptr, nullptr);
const int size = BN_num_bits(p);
if (size < 1024) {
return node::THROW_ERR_INVALID_ARG_VALUE(
return THROW_ERR_INVALID_ARG_VALUE(
env, "DH parameter is less than 1024 bits");
} else if (size < 2048) {
args.GetReturnValue().Set(FIXED_ONE_BYTE_STRING(
Expand Down Expand Up @@ -1205,7 +1205,7 @@ void SecureContext::SetTicketKeys(const FunctionCallbackInfo<Value>& args) {
THROW_AND_RETURN_IF_NOT_BUFFER(env, args[0], "Ticket keys");

if (Buffer::Length(args[0]) != 48) {
return node::THROW_ERR_INVALID_ARG_VALUE(
return THROW_ERR_INVALID_ARG_VALUE(
env, "Ticket keys length must be 48 bytes");
}

Expand Down Expand Up @@ -4394,7 +4394,7 @@ void ECDH::New(const FunctionCallbackInfo<Value>& args) {

int nid = OBJ_sn2nid(*curve);
if (nid == NID_undef)
return node::THROW_ERR_INVALID_ARG_VALUE(env,
return THROW_ERR_INVALID_ARG_VALUE(env,
"First argument should be a valid curve name");

EC_KEY* key = EC_KEY_new_by_curve_name(nid);
Expand Down