Fix the need for rejectUnauthorized being false. The tlsOptions object should include a host for certificate verification.

fork
Ângela Igreja 11 years ago
parent b39cbca1e6
commit 9c2a92b184

@ -105,6 +105,7 @@ Connection.prototype.connect = function() {
for (var k in config.tlsOptions)
tlsOptions[k] = config.tlsOptions[k];
tlsOptions.socket = socket;
tlsOptions.host = config.host;
}
if (config.tls)
@ -1633,6 +1634,7 @@ Connection.prototype._starttls = function() {
for (var k in this._config.tlsOptions)
tlsOptions[k] = this._config.tlsOptions[k];
tlsOptions.socket = self._sock;
tlsOptions.host = this._config.host;
self._sock = tls.connect(tlsOptions, function() {
self._login();

Loading…
Cancel
Save