aboutsummaryrefslogtreecommitdiffstats
path: root/device/device.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-17 23:06:56 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-17 23:07:14 -0600
commit4739708ca4fa68e2dd1915618d8cba113dac9312 (patch)
tree1a730740b48d573a035cc07db9d02117e3d9276c /device/device.go
parentglobal: use RTMGRP_* consts from x/sys/unix (diff)
downloadwireguard-go-4739708ca4fa68e2dd1915618d8cba113dac9312.tar.xz
wireguard-go-4739708ca4fa68e2dd1915618d8cba113dac9312.zip
noise: unify zero checking of ecdh
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/device/device.go b/device/device.go
index 0b909a7..8c08f1c 100644
--- a/device/device.go
+++ b/device/device.go
@@ -240,9 +240,6 @@ func (device *Device) SetPrivateKey(sk NoisePrivateKey) error {
for _, peer := range device.peers.keyMap {
handshake := &peer.handshake
handshake.precomputedStaticStatic = device.staticIdentity.privateKey.sharedSecret(handshake.remoteStatic)
- if isZero(handshake.precomputedStaticStatic[:]) {
- panic("an invalid peer public key made it into the configuration")
- }
expiredPeers = append(expiredPeers, peer)
}