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

@ -7,6 +7,7 @@ import (
"net"
"github.com/khlieng/dispatch/Godeps/_workspace/src/github.com/gorilla/websocket"
"github.com/khlieng/dispatch/Godeps/_workspace/src/github.com/spf13/viper"
"github.com/khlieng/dispatch/irc"
"github.com/khlieng/dispatch/storage"
@ -113,7 +114,8 @@ func (h *wsHandler) connect(b []byte) {
if cert := h.session.user.GetCertificate(); cert != nil {
i.TLSConfig = &tls.Config{
Certificates: []tls.Certificate{*cert},
Certificates: []tls.Certificate{*cert},
InsecureSkipVerify: !viper.GetBool("verify_client_certificates"),
}
}