diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2019-04-24 10:44:01 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2019-04-26 10:38:38 -0700 |
commit | 86b4f3729ae66d8da8e86f37684de439bbe0e08a (patch) | |
tree | 98dd0fd44ee87a19f1828f36c65a14d285ec2828 /src | |
parent | 1d022e825356dfba9bef2d6f194b9e93d63b726d (diff) | |
download | android-node-v8-86b4f3729ae66d8da8e86f37684de439bbe0e08a.tar.gz android-node-v8-86b4f3729ae66d8da8e86f37684de439bbe0e08a.tar.bz2 android-node-v8-86b4f3729ae66d8da8e86f37684de439bbe0e08a.zip |
tls: include invalid method name in thrown error
When an invalid TLS method name error is thrown, include the invalid
name in the error message.
PR-URL: https://github.com/nodejs/node/pull/27390
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_crypto.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 49d1d41779..4529a5d22d 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -627,7 +627,8 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) { max_version = TLS1_2_VERSION; method = TLS_client_method(); } else { - THROW_ERR_TLS_INVALID_PROTOCOL_METHOD(env, "Unknown method"); + const std::string msg("Unknown method: "); + THROW_ERR_TLS_INVALID_PROTOCOL_METHOD(env, (msg + * sslmethod).c_str()); return; } } |