Add method to get channel binding

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
This commit is contained in:
Jonathan Rudenberg 2016-07-13 15:28:03 -04:00
parent ad132441f7
commit b16acbb322

View File

@ -396,3 +396,10 @@ func (s *HandshakeState) ReadMessage(out, message []byte) ([]byte, *CipherState,
return out, nil, nil, nil
}
// ChannelBinding provides a value that uniquely identifies the session and can
// be used as a channel binding. It is an error to call this method before the
// handshake is complete.
func (s *HandshakeState) ChannelBinding() []byte {
return s.ss.h
}