Permalink
Browse files

Allow self-signed certificates

  • Loading branch information...
1 parent 2e7202a commit 640b427f752d96ac6f712207838e831cabcf5d08 @dsamarin dsamarin committed Jan 5, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/irc/client.js
View
@@ -187,7 +187,14 @@ Client.prototype.ping_server = function() {
Client.prototype.events = {
secureConnect: function() {
- if (this.connection.authorized) {
+ var authorized = this.connection.authorized;
+
+ if (this.profile.ssl_allow_self_signed &&
+ this.connection.authorizationError == "DEPTH_ZERO_SELF_SIGNED_CERT") {
+ authorized = true;
+ }
+
+ if (authorized) {
this.events.connect.call (this);
} else {
console.log ("%s: Peer certificate was not signed by specified CA: %s", this.name, this.connection.authorizationError);

0 comments on commit 640b427

Please sign in to comment.