Clear cryptographic state when interface down
Attempts to clear the cryptographic state for every peer when the device goes down.
This commit is contained in:
parent
029410b118
commit
4f97b52ea6
5 changed files with 58 additions and 41 deletions
|
|
@ -274,12 +274,7 @@ func (peer *Peer) RoutineTimerHandler() {
|
|||
// zero out handshake
|
||||
|
||||
device.indices.Delete(hs.localIndex)
|
||||
|
||||
hs.localIndex = 0
|
||||
setZero(hs.localEphemeral[:])
|
||||
setZero(hs.remoteEphemeral[:])
|
||||
setZero(hs.chainKey[:])
|
||||
setZero(hs.hash[:])
|
||||
hs.Clear()
|
||||
hs.mutex.Unlock()
|
||||
|
||||
// handshake timers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue