tls: Provide buffer to Connection.setSession

This commit is contained in:
isaacs 2012-10-12 18:41:30 -07:00
parent bfb9d5bbe6
commit 4266f5cf2e

View File

@ -1296,7 +1296,10 @@ exports.connect = function(/* [port, host], options, cb */) {
});
if (options.session) {
pair.ssl.setSession(options.session);
var session = options.session;
if (typeof session === 'string')
session = new Buffer(session, 'binary');
pair.ssl.setSession(session);
}
var cleartext = pipe(pair, socket);