Add verify_client_certificates to the config
This commit is contained in:
parent
13a3d96b44
commit
796bbd834e
6 changed files with 24 additions and 26 deletions
|
@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue