From b16acbb322765df32acb526a2165c07cab5e8b89 Mon Sep 17 00:00:00 2001 From: Jonathan Rudenberg Date: Wed, 13 Jul 2016 15:28:03 -0400 Subject: [PATCH] Add method to get channel binding Signed-off-by: Jonathan Rudenberg --- state.go | 7 +++++++ 1 file changed, 7 insertions(+) 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 +}