From 9d48b3b0f82e5c71bb83a757d216d76f61ae0915 Mon Sep 17 00:00:00 2001 From: Jonathan Rudenberg Date: Wed, 13 Jul 2016 19:53:24 -0400 Subject: [PATCH] Add PeerStatic method to HandshakeState Signed-off-by: Jonathan Rudenberg --- state.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/state.go b/state.go index 8812021..2538dd3 100644 --- a/state.go +++ b/state.go @@ -403,3 +403,10 @@ func (s *HandshakeState) ReadMessage(out, message []byte) ([]byte, *CipherState, func (s *HandshakeState) ChannelBinding() []byte { return s.ss.h } + +// PeerStatic returns the static key provided by the remote peer during +// a handshake. It is an error to call this method if a handshake message +// containing a static key has not been read. +func (s *HandshakeState) PeerStatic() []byte { + return s.rs +}