mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-06 02:30:57 -08:00
Simplify getting a hostinfo or starting a handshake with one (#954)
This commit is contained in:
parent
7edcf620c0
commit
076ebc6c6e
12 changed files with 158 additions and 215 deletions
|
|
@ -23,14 +23,12 @@ type ConnectionState struct {
|
|||
initiator bool
|
||||
messageCounter atomic.Uint64
|
||||
window *Bits
|
||||
queueLock sync.Mutex
|
||||
writeLock sync.Mutex
|
||||
ready bool
|
||||
}
|
||||
|
||||
func NewConnectionState(l *logrus.Logger, cipher string, certState *CertState, initiator bool, pattern noise.HandshakePattern, psk []byte, pskStage int) *ConnectionState {
|
||||
var dhFunc noise.DHFunc
|
||||
|
||||
switch certState.Certificate.Details.Curve {
|
||||
case cert.Curve_CURVE25519:
|
||||
dhFunc = noise.DH25519
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue