Make the SSL config app-configurable
This commit is contained in:
parent
b62f72a746
commit
52c17040d5
2
irc.go
2
irc.go
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user