You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node.js v0.12.7 session resumption (caching) is not working #3132
CONNECTED(00000003)depth=3 C = IL, O = StartCom Ltd., OU = Secure Digital Certificate Signing, CN = StartCom Certification Authorityverify return:1depth=2 C = CN, O = WoSign CA Limited, CN = Certification Authority of WoSignverify return:1depth=1 C = CN, O = WoSign CA Limited, CN = WoSign CA Free SSL Certificate G2verify return:1depth=0 CN = DOMAINNAME.COMverify return:1
... and that's it. Nothing happens after this output. Let's try to get an additional information:
Also, note that id is a buffer, not a string. It contains binary data so if you use it as a key in a dictionary, it's going to get toString-ed and that might end up clobbering it.
Activity
silverwind commentedon Sep 30, 2015
Pretty sure you need to manage session ids through the
newSessionandresumeSessionevents on the server, see: https://strongloop.com/strongblog/improve-the-performance-of-the-node-js-https-server/.Fr1ar commentedon Oct 1, 2015
@silverwind Unfortunately it didn't help and even made situation worse :(
Check what happened:
$ openssl s_client -connect DOMAINNAME.COM:443 -reconnect -no_ticket -CAfile /etc/ssl/node/root.crtOutput:
... and that's it. Nothing happens after this output. Let's try to get an additional information:
$ openssl s_client -connect DOMAINNAME.COM:443 -reconnect -msg -debug -state -no_ticket -CAfile /etc/ssl/node/root.crtCan you explain this output and why session resumption with cache doesn't work?
bnoordhuis commentedon Oct 1, 2015
You have a few bugs in your 'newSession' handler. This:
Should be this:
Also, note that
idis a buffer, not a string. It contains binary data so if you use it as a key in a dictionary, it's going to get toString-ed and that might end up clobbering it.silverwind commentedon Oct 1, 2015
@Fr1ar sorry for linking that, I didn't realize it was outdated. I'll see if we can provide a working example in the docs soon.
Fr1ar commentedon Oct 1, 2015
@bnoordhuis, @silverwind Thanks guys! After I added the 'cb' parameter to the newSession function everything works fine!
Now my code looks like:
jbergstroem commentedon Oct 1, 2015
Looks like we're sorted here. Closing.
doc: add TLS session resumption example
doc: add TLS session resumption example
doc: add TLS session resumption example