diff --git a/lib/socket.js b/lib/socket.js index 9bf9f4607..04d32799d 100644 --- a/lib/socket.js +++ b/lib/socket.js @@ -92,7 +92,7 @@ function Socket (uri, opts) { this.cert = opts.cert || null; this.ca = opts.ca || null; this.ciphers = opts.ciphers || null; - this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? null : opts.rejectUnauthorized; + this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? true : opts.rejectUnauthorized; this.forceNode = !!opts.forceNode; // other options for Node.js client