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 {