Add verify_client_certificates to the config

This commit is contained in:
Ken-Håvard Lieng 2016-01-14 06:17:53 +01:00
parent 13a3d96b44
commit 796bbd834e
6 changed files with 24 additions and 26 deletions

View file

@ -4,7 +4,6 @@ import (
"bufio"
"crypto/tls"
"fmt"
"log"
"net"
"strings"
"time"
@ -51,12 +50,6 @@ func (c *Client) connect() error {
defer c.lock.Unlock()
if c.TLS {
if c.TLSConfig == nil {
c.TLSConfig = &tls.Config{
InsecureSkipVerify: true,
}
}
conn, err := tls.DialWithDialer(c.dialer, "tcp", c.Server, c.TLSConfig)
if err != nil {
return err
@ -100,7 +93,6 @@ func (c *Client) tryConnect() {
return
}
log.Println(err)
time.Sleep(c.backoff.Duration())
}
}