summaryrefslogtreecommitdiff
path: root/lib/_tls_wrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r--lib/_tls_wrap.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 697fbfa3e5..0f52363e10 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -602,7 +602,7 @@ TLSSocket.prototype.setServername = function(name) {
TLSSocket.prototype.setSession = function(session) {
if (typeof session === 'string')
- session = new Buffer(session, 'binary');
+ session = Buffer.from(session, 'binary');
this._handle.setSession(session);
};
@@ -845,7 +845,7 @@ Server.prototype._getServerData = function() {
Server.prototype._setServerData = function(data) {
- this.setTicketKeys(new Buffer(data.ticketKeys, 'hex'));
+ this.setTicketKeys(Buffer.from(data.ticketKeys, 'hex'));
};