mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 22:46:52 +01:00
Run hybrid handshakes: v3 holders initiate them, responders wait for msg3, initiators resend it until confirmed
This commit is contained in:
1 parent
5c5254dc18
commit
b26c1e9c3e
8 files changed
+913
-36
No files matched your search
@@ -92,6 +92,14 @@ func (cs *ConnectionState) NextMessageCounter() (uint64, bool) {
|
||||
return c, true
|
||||
}
|
||||
|
||||
// heardFromPeer reports whether anything from the peer has decrypted under these
|
||||
// keys, beyond the handshake messages the replay window was seeded with.
|
||||
func (cs *ConnectionState) heardFromPeer(handshakeMessages uint64) bool {
|
||||
cs.decryptLock.Lock()
|
||||
defer cs.decryptLock.Unlock()
|
||||
return cs.window.current > handshakeMessages
|
||||
}
|
||||
|
||||
func (cs *ConnectionState) Curve() cert.Curve {
|
||||
return cs.myCert.Curve()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user