Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: include invalid method name in thrown error #27390

Closed

Conversation

Projects
None yet
6 participants
@sam-github
Copy link
Member

commented Apr 24, 2019

When an invalid TLS method name error is thrown, include the invalid
name in the error message.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
@nodejs-github-bot

This comment has been minimized.

Show resolved Hide resolved doc/api/errors.md Outdated

@sam-github sam-github force-pushed the sam-github:invalid-method-name-in-error branch from e847200 to cc0576f Apr 24, 2019

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.

@sam-github sam-github force-pushed the sam-github:invalid-method-name-in-error branch from cc0576f to 5076542 Apr 24, 2019

@nodejs-github-bot

This comment has been minimized.

@@ -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());

This comment has been minimized.

Copy link
@sam-github

sam-github Apr 24, 2019

Author Member

In case this looks like extraneous white space -- the cpp linter doesn't allow *sslmethod here, though it does in all the calls to strcmp() above.

@sam-github

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2019

All green. @mscdex PTAL

@mscdex

mscdex approved these changes Apr 25, 2019

Trott pushed a commit to Trott/io.js that referenced this pull request Apr 26, 2019

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: nodejs#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>
@sam-github

This comment has been minimized.

Copy link
Member Author

commented Apr 26, 2019

Landed in 86b4f37

@sam-github sam-github closed this Apr 26, 2019

@sam-github sam-github deleted the sam-github:invalid-method-name-in-error branch Apr 26, 2019

targos added a commit that referenced this pull request Apr 27, 2019

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: #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>

@targos targos referenced this pull request Apr 27, 2019

Merged

v12.1.0 proposal #27440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.