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

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

Closed
Rush opened this issue May 17, 2016 · 5 comments
Closed

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

Rush opened this issue May 17, 2016 · 5 comments
Labels
tls Issues and PRs related to the tls subsystem.

Comments

@Rush
Copy link

Rush commented May 17, 2016

Version: at least 4.x to 6.1.0
Platform: Linux
Subsystem: tls

server.on('OCSPRequest', function(cert, issuer, cb) {

When I debug the data here, I get cert === null and issuer === null. If I do cb(null, null); then I get a crash:

Error: error:140C6043:SSL routines:SSL_use_certificate:passed a null parameter
at Error (native)
  at _tls_wrap.js:174:20
  at onOCSP (_tls_wrap.js:143:5)
  at Server.<anonymous> (/opt/virtkick/src/node_modules/http-master/src/HttpMasterWorker.js:249:16)
  at emitThree (events.js:116:13)
  at Server.emit (events.js:194:7)
  at requestOCSP (_tls_wrap.js:123:17)
  at _tls_wrap.js:167:5
  at _tls_wrap.js:106:5
  at TLSSocket.sniCallback [as _SNICallback] (/opt/virtkick/src/node_modules/http-master/src/HttpMasterWorker.js:73:20)
  at loadSNI (_tls_wrap.js:91:8)

Sorry, I don't have a test case and cannot share my letsencrypt certificate here. @indutny - any ideas what's happening or if the problem is somehow on my end?

@mscdex mscdex added the tls Issues and PRs related to the tls subsystem. label May 18, 2016
@mscdex
Copy link
Contributor

mscdex commented May 18, 2016

/cc @nodejs/crypto

@indutny
Copy link
Member

indutny commented May 18, 2016

Thank you for reporting this. Do you use SNI too?

@Rush
Copy link
Author

Rush commented May 18, 2016

Thank you for reporting this. Do you use SNI too?

Yes sir

@indutny
Copy link
Member

indutny commented May 18, 2016

@Rush may I ask you to share your SNICallback with us? How do you create SecureContexts?

indutny added a commit to indutny/io.js that referenced this issue May 20, 2016
Catch and emit `certCbDone` exceptions instead of throwing them as
`uncaughtException` and crashing the whole process.

Fix: nodejs#6822
@indutny
Copy link
Member

indutny commented May 20, 2016

@Rush nevermind, this should fix it #6887

Fishrock123 pushed a commit to Fishrock123/node that referenced this issue 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 <[email protected]>
rvagg pushed a commit that referenced this issue 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 <[email protected]>
MylesBorins pushed a commit that referenced this issue 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 <[email protected]>
MylesBorins pushed a commit that referenced this issue 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 <[email protected]>
MylesBorins pushed a commit that referenced this issue 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 <[email protected]>
MylesBorins pushed a commit that referenced this issue 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 <[email protected]>
MylesBorins pushed a commit that referenced this issue 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 <[email protected]>
MylesBorins pushed a commit that referenced this issue 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants