Add PeerStatic method to HandshakeState

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
This commit is contained in:
Jonathan Rudenberg 2016-07-13 19:53:24 -04:00
parent b16acbb322
commit 9d48b3b0f8

View File

@ -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
}