-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Clients fails to load https webpage when OCSP stapling is enabled #8660
Comments
Hello! May I ask you to post a test case that I could try? Thank you! |
Okay, a test case:
|
@djphoenix the link you gave here does not work, I get 403 on it. Could you please post the source in a gist? I suppose it should be just a single javascript file without dependencies anyway. |
OK, gist URL: https://gist.github.com/djphoenix/198104dc85452ca1f76b |
What's |
Oh, I see you have a
|
Anyway, I have reproduced it, thank you! |
Which version of Node you're using? This code perfectly works on 0.11.14 |
Tried on both v0.10 and latest v0.11. |
Anyway, it doesn't matter much. |
Could you please give a try to following patch: diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 4ec9280..703f125 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -200,7 +200,10 @@ function onnewsession(key, session) {
var once = false;
this._newSessionPending = true;
- this.server.emit('newSession', key, session, function() {
+ if (!this.server.emit('newSession', key, session, done))
+ done();
+
+ function done() {
if (once)
return;
once = true;
@@ -211,7 +214,7 @@ function onnewsession(key, session) {
if (self._securePending)
self._finishInit();
self._securePending = false;
- });
+ }
} Hope it will fix the problem for you! |
I've applied your patch, but nothing changed. In Safari and cURL connection still freezing. |
...Okay, I found working workaround for my problem - implement both OCSPRequest events and newSession/resumeSession. |
When listening for client hello parser events (like OCSP requests), do not hang if `newSession` event handler is not present. Fix: nodejs#8660 Fi: nodejs#25735 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: node-forward/node#47
When listening for client hello parser events (like OCSP requests), do not hang if `newSession` event handler is not present. Fix: nodejs#8660 Fix: nodejs#25735 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: node-forward/node#47
This is my "working workaround" :)
|
When listening for client hello parser events (like OCSP requests), do not hang if `newSession` event handler is not present. Fix: nodejs#8660 Fix: nodejs#25735 Reviewed-By: Fedor Indutny <fedor@indutny.com> PR-URL: nodejs#25739
I was enabled OCSPRequest event listener on my server, and wrote handler for OCSP. But many clients like Safari, curl, and openssl s_client now fails to connect. In chrome, for example, it works correctly.
Example server that have OCSP stapling enabled: https://phoenix.dj/ (node 0.11.14)
The text was updated successfully, but these errors were encountered: