Browse Source

doc: fix indent in tls resumption example

Markdown requires 4-space indent to correctly format code blocks. This
fixes the example so it's correctly presented as code.

PR-URL: https://github.com/nodejs/node/pull/3372
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
v5.x
Roman Reiss 9 years ago
parent
commit
503f279527
  1. 16
      doc/api/tls.markdown

16
doc/api/tls.markdown

@ -605,14 +605,14 @@ established after addition of event listener.
Here's an example for using TLS session resumption:
var tlsSessionStore = {};
server.on('newSession', function(id, data, cb) {
tlsSessionStore[id.toString('hex')] = data;
cb();
});
server.on('resumeSession', function(id, cb) {
cb(null, tlsSessionStore[id.toString('hex')] || null);
});
var tlsSessionStore = {};
server.on('newSession', function(id, data, cb) {
tlsSessionStore[id.toString('hex')] = data;
cb();
});
server.on('resumeSession', function(id, cb) {
cb(null, tlsSessionStore[id.toString('hex')] || null);
});
### Event: 'OCSPRequest'

Loading…
Cancel
Save