We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c10a96c commit 510a273Copy full SHA for 510a273
lib/connection.js
@@ -91,9 +91,18 @@ Connection.prototype.connect = function (port, host) {
91
return self.emit('error', new Error('There was an error establishing an SSL connection'))
92
}
93
var tls = require('tls')
94
- const options = Object.assign({
95
- socket: self.stream
96
- }, self.ssl)
+ const options = {
+ socket: self.stream,
+ checkServerIdentity: self.ssl.checkServerIdentity || tls.checkServerIdentity,
97
+ rejectUnauthorized: self.ssl.rejectUnauthorized,
98
+ ca: self.ssl.ca,
99
+ pfx: self.ssl.pfx,
100
+ key: self.ssl.key,
101
+ passphrase: self.ssl.passphrase,
102
+ cert: self.ssl.cert,
103
+ secureOptions: self.ssl.secureOptions,
104
+ NPNProtocols: self.ssl.NPNProtocols
105
+ }
106
if (net.isIP(host) === 0) {
107
options.servername = host
108
0 commit comments