From 52c17040d52806a01b41e83e9f2424445b3c7a56 Mon Sep 17 00:00:00 2001 From: lye Date: Sun, 18 Mar 2012 17:08:05 -0500 Subject: [PATCH] Make the SSL config app-configurable --- irc.go | 2 +- irc_struct.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/irc.go b/irc.go index 44a777c..b629a2b 100644 --- a/irc.go +++ b/irc.go @@ -200,7 +200,7 @@ func (i *IRCConnection) ConnectSSL(server string) error { i.server = server fmt.Printf("Connecting to %s over SSL\n", i.server) var err error - i.socket, err = tls.Dial("tcp", i.server, nil) + i.socket, err = tls.Dial("tcp", i.server, i.SSLConfig) if err != nil { return err } diff --git a/irc_struct.go b/irc_struct.go index fb1b788..6ad78ad 100644 --- a/irc_struct.go +++ b/irc_struct.go @@ -7,6 +7,7 @@ package irc import ( "net" "time" + "crypto/tls" ) type IRCConnection struct { @@ -29,6 +30,8 @@ type IRCConnection struct { VerboseCallbackHandler bool quitting bool + + SSLConfig *tls.Config } type IRCEvent struct {