-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible with Node 0.10.x with secure
is true
#160
Comments
Not sure what the 'correct' fix is, but here is what I had to do: First, add a 'netError' handler (instead of just 'error'): client.addListener('netError', function(error) {
console.log('netError: ' + error);
}); that started showing the error: netError: Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE Which I used to see prior to setting diff --git a/lib/irc.js b/lib/irc.js
index 79e9600..c1bd172 100644
--- a/lib/irc.js
+++ b/lib/irc.js
@@ -577,7 +577,7 @@ Client.prototype.connect = function ( retryCount, callback ) { // {{{
if (self.opt.secure) {
var creds = self.opt.secure;
if (typeof self.opt.secure !== 'object') {
- creds = {};
+ creds = { rejectUnauthorized: !self.opt.selfSigned };
}
self.conn = tls.connect(self.opt.port, self.opt.server, creds, function() { and success. node-irc now working with 10.0.x. |
This fix worked for me. Any idea when this issue will be correct in the master branch? |
Yeah I also stumbled upon this. It seems that the 'error' callback is called, maybe because there is no netError callback. Maybe the tls library changed behavior slightly, I don't know. Anyway, without the rejectUnauthorized option, the connect callback never gets called. Oh by the way, I think it should be: creds = { rejectUnauthorized: !self.opt.secure }; since besides |
@ronaldevers fix worked for me too. Thanks! 😃 |
👍 |
Can you push a new release of irc.js with this bugfix? it works for me too |
Worked here as well |
Yeah, this appears to still be a thing. |
+1 This helped me save a few hours of debugging. |
Fixed in master. |
I ran into a problem setting up hubot-irc (nandub/hubot-irc#76). At this point, the problem appears to be that node-irc (a dependency of hubot-irc) is incompatible with Node versions 0.10.x. Downgrading to 0.8.x fixes any issues. To replicate, run the secure.js example using Node 0.10.x and 0.8.x (you will have to comment out line 4).
The text was updated successfully, but these errors were encountered: