Make the SSL config app-configurable

This commit is contained in:
lye 2012-03-18 17:08:05 -05:00
parent b62f72a746
commit 52c17040d5
2 changed files with 4 additions and 1 deletions

2
irc.go
View File

@ -200,7 +200,7 @@ func (i *IRCConnection) ConnectSSL(server string) error {
i.server = server i.server = server
fmt.Printf("Connecting to %s over SSL\n", i.server) fmt.Printf("Connecting to %s over SSL\n", i.server)
var err error 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 { if err != nil {
return err return err
} }

View File

@ -7,6 +7,7 @@ package irc
import ( import (
"net" "net"
"time" "time"
"crypto/tls"
) )
type IRCConnection struct { type IRCConnection struct {
@ -29,6 +30,8 @@ type IRCConnection struct {
VerboseCallbackHandler bool VerboseCallbackHandler bool
quitting bool quitting bool
SSLConfig *tls.Config
} }
type IRCEvent struct { type IRCEvent struct {