Synchronize user.certificate access
This commit is contained in:
parent
67b83fa3d6
commit
81500cc89e
4 changed files with 16 additions and 8 deletions
|
@ -22,9 +22,9 @@ func reconnectIRC() {
|
|||
i.Password = server.Password
|
||||
i.Realname = server.Realname
|
||||
|
||||
if user.Certificate != nil {
|
||||
if cert := user.GetCertificate(); cert != nil {
|
||||
i.TLSConfig = &tls.Config{
|
||||
Certificates: []tls.Certificate{*user.Certificate},
|
||||
Certificates: []tls.Certificate{*cert},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -105,9 +105,9 @@ func (h *wsHandler) connect(b []byte) {
|
|||
i.Password = data.Password
|
||||
i.Realname = data.Realname
|
||||
|
||||
if h.session.user.Certificate != nil {
|
||||
if cert := h.session.user.GetCertificate(); cert != nil {
|
||||
i.TLSConfig = &tls.Config{
|
||||
Certificates: []tls.Certificate{*h.session.user.Certificate},
|
||||
Certificates: []tls.Certificate{*cert},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue