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:
+1
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user