feat: add functions to retrieve h,e,rs,re

This commit is contained in:
Richard Ramos 2022-12-21 08:47:05 -04:00
parent aedffc51a8
commit daf3130edf
No known key found for this signature in database
GPG Key ID: BD36D48BC9FFC88C
1 changed files with 18 additions and 2 deletions

View File

@ -284,6 +284,22 @@ func (h *Handshake) FinalizeHandshake() (*HandshakeResult, error) {
} }
// HandshakeComplete indicates whether the handshake process is complete or not // HandshakeComplete indicates whether the handshake process is complete or not
func (hs *Handshake) IsComplete() bool { func (h *Handshake) IsComplete() bool {
return hs.hsResult != nil return h.hsResult != nil
}
func (h *Handshake) LocalEphemeralKeypair() Keypair {
return h.hs.e
}
func (h *Handshake) RemoteStaticPublicKey() []byte {
return h.hs.rs
}
func (h *Handshake) RemoteEphemeralPublicKey() []byte {
return h.hs.re
}
func (h *Handshake) H() []byte {
return h.hs.ss.h
} }