aboutsummaryrefslogtreecommitdiffstats
path: root/src/timers.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2018-02-02 17:24:29 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2018-02-02 17:24:29 +0100
commit4f97b52ea60ce4f2448d8617853aa44759727197 (patch)
treeb130341a75677a627c9649bfe4532e19c946b755 /src/timers.go
parentRework of entire locking system (diff)
downloadwireguard-go-4f97b52ea60ce4f2448d8617853aa44759727197.tar.xz
wireguard-go-4f97b52ea60ce4f2448d8617853aa44759727197.zip
Clear cryptographic state when interface down
Attempts to clear the cryptographic state for every peer when the device goes down.
Diffstat (limited to '')
-rw-r--r--src/timers.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/timers.go b/src/timers.go
index 2ef105e..7092688 100644
--- a/src/timers.go
+++ b/src/timers.go
@@ -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