Skip to content
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

Fix TLS connections. #304

Merged
merged 1 commit into from
Jan 13, 2015
Merged

Fix TLS connections. #304

merged 1 commit into from
Jan 13, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jan 13, 2015

Root cause: the self.opt.selfSigned parameter wasn't being
assigned to the options passed to tls.connect(), meaning that
connections to most ircds would fail. This explains why
connections to freenode (who have a proper certificate) work
while connections to most other ircds (which use self-signed
certs) fail.

While here, write some tests that ensure connecting to a secure
server actually works. This involves a refactor of
tests/test-irc.js to support both plaintext and encrypted
connections. This also includes a self-signed certificate for
testing locally.

There are also a few small, minor fixes to the helpers to either
remove unnecessary code or clean up. MockIrcd now supports an
option to its constructor that determines whether the connection
should be secure or not.

Still to do: refactor all of the TLS handling in irc.js to be
cleaner and to remove the duplicate code.

@ghost ghost added the bug label Jan 13, 2015
Root cause: the `self.opt.selfSigned` parameter wasn't being
assigned to the options passed to `tls.connect()`, meaning that
connections to most ircds would fail. This explains why
connections to freenode (who have a proper certificate) work
while connections to most other ircds (which use self-signed
certs) fail.

While here, write some tests that ensure connecting to a secure
server actually works. This involves a refactor of
tests/test-irc.js to support both plaintext and encrypted
connections. This also includes a self-signed certificate for
testing locally.

There are also a few small, minor fixes to the helpers to either
remove unnecessary code or clean up. MockIrcd now supports an
option to its constructor that determines whether the connection
should be secure or not.

Still to do: refactor all of the TLS handling in irc.js to be
cleaner and to remove the duplicate code.
@jirwin jirwin force-pushed the apeiron/fix-secure-connections branch from 8b5ba77 to 5727077 Compare January 13, 2015 07:06
@jirwin
Copy link
Collaborator

jirwin commented Jan 13, 2015

+1

jirwin added a commit that referenced this pull request Jan 13, 2015
@jirwin jirwin merged commit 4d22148 into master Jan 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant