Skip to content

Commit 4266f5c

Browse files
committed
tls: Provide buffer to Connection.setSession
1 parent bfb9d5b commit 4266f5c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/tls.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,10 @@ exports.connect = function(/* [port, host], options, cb */) {
12961296
});
12971297

12981298
if (options.session) {
1299-
pair.ssl.setSession(options.session);
1299+
var session = options.session;
1300+
if (typeof session === 'string')
1301+
session = new Buffer(session, 'binary');
1302+
pair.ssl.setSession(session);
13001303
}
13011304

13021305
var cleartext = pipe(pair, socket);

0 commit comments

Comments
 (0)