mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-19 21:59:59 -08:00
Update to new crypto/tls API.
This commit is contained in:
parent
9fe5a30ee3
commit
2eb5516d31
1 changed files with 3 additions and 3 deletions
|
|
@ -263,10 +263,10 @@ func (server *Server) handleAuthenticate(client *Client, msg *Message) {
|
|||
client.Panic("Type assertion failed")
|
||||
return
|
||||
}
|
||||
certs := tlsconn.PeerCertificates()
|
||||
if len(certs) > 0 {
|
||||
state := tlsconn.ConnectionState()
|
||||
if len(state.PeerCertificates) > 0 {
|
||||
hash := sha1.New()
|
||||
hash.Write(certs[0].Raw)
|
||||
hash.Write(state.PeerCertificates[0].Raw)
|
||||
client.Hash = hex.EncodeToString(hash.Sum())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue