MCPcopy
hub / github.com/plasma-umass/browsix / onSession

Function onSession

node/lib/_tls_wrap.js:56–73  ·  view source on GitHub ↗
(err, session)

Source from the content-addressed store, hash-verified

54function loadSession(self, hello, cb) {
55 var once = false;
56 function onSession(err, session) {
57 if (once)
58 return cb(new Error('TLS session callback was called 2 times'));
59 once = true;
60
61 if (err)
62 return cb(err);
63
64 if (!self._handle)
65 return cb(new Error('Socket is closed'));
66
67 // NOTE: That we have disabled OpenSSL's internal session storage in
68 // `node_crypto.cc` and hence its safe to rely on getting servername only
69 // from clienthello or this place.
70 var ret = self._handle.loadSession(session);
71
72 cb(null, ret);
73 }
74
75 if (hello.sessionId.length <= 0 ||
76 hello.tlsTicket ||

Callers

nothing calls this directly

Calls 1

cbFunction · 0.70

Tested by

no test coverage detected