import (
"bytes"
- "encoding/binary"
"log"
"net"
"sync/atomic"
}
nonceExpectation := make([]byte, govpn.NonceSize)
- binary.BigEndian.PutUint64(nonceExpectation, peer.NonceExpect)
- peer.NonceCipher.Encrypt(nonceExpectation, nonceExpectation)
+ peer.NonceExpectation(nonceExpectation)
prev = 0
var i int
TransportCycle:
rehandshaking <- struct{}{}
break TransportCycle
}
- binary.BigEndian.PutUint64(nonceExpectation, peer.NonceExpect)
- peer.NonceCipher.Encrypt(nonceExpectation, nonceExpectation)
+ peer.NonceExpectation(nonceExpectation)
copy(buf, buf[i+govpn.NonceSize:prev])
prev = prev - i - govpn.NonceSize
goto CheckMore