diff --git a/state.go b/state.go index a134f41..8812021 100644 --- a/state.go +++ b/state.go @@ -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 +}