Skip to content

tls: catch certCbDone exceptions - #6887

Closed
indutny wants to merge 3 commits into
nodejs:masterfrom
indutny:fix/gh-6822
Closed

tls: catch certCbDone exceptions#6887
indutny wants to merge 3 commits into
nodejs:masterfrom
indutny:fix/gh-6822

Conversation

@indutny

@indutnyindutny commented May 20, 2016

Copy link
Copy Markdown
Member
Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Catch and emit certCbDone exceptions instead of throwing them as
uncaughtException and crashing the whole process.

Fix: #6822

cc @nodejs/crypto

Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: nodejs#6822
@nodejs-github-botnodejs-github-bot added the tls Issues and PRs related to the tls subsystem. label May 20, 2016
@indutnyindutny added c++ Issues and PRs that require attention from people who are familiar with C++. lts-watch-v4.x and removed c++ Issues and PRs that require attention from people who are familiar with C++. labels May 20, 2016
@indutny

Copy link
Copy Markdown
MemberAuthor

};

const server = tls.createServer(options, (c) => {
assert(false, 'Should not be called');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common.fail

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

@indutny

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis everything fixed, PTAL

@indutny

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis

Copy link
Copy Markdown
Member

LGTM but there are test failures on the Windows bots that may or may not be related:

@indutny

Copy link
Copy Markdown
MemberAuthor

Likely unrelated, landing.

@indutny

Copy link
Copy Markdown
MemberAuthor

Landed in 9cac8c8, thank you!

@indutnyindutny closed this May 25, 2016
@indutny
indutny deleted the fix/gh-6822 branch May 25, 2016 20:07
indutny added a commit that referenced this pull request May 25, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 30, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: nodejs#6822
PR-URL: nodejs#6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@MylesBorins

Copy link
Copy Markdown
Contributor

@indutny we are getting failures backporting this one to lts

Path: parallel/test-tls-empty-sni-context
Command: out/Release/node /Users/thealphanerd/code/node/v4.x/test/parallel/test-tls-empty-sni-context.js
--- TIMEOUT ---

@indutny

Copy link
Copy Markdown
MemberAuthor

How does the backport look like?

@MylesBorins

Copy link
Copy Markdown
Contributor

@indutny it landed cleanly

@indutny

Copy link
Copy Markdown
MemberAuthor

tlsClientError => clientError ;)

MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@MylesBorinsMylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.
Fix: #6822
PR-URL: #6887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tlsIssues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting null cert and null issuer in OCSPRequest which leads to crash

4 participants

@indutny@bnoordhuis@MylesBorins@nodejs-github-bot