mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-21 14:11:56 +00:00
wgengine/magicsock: replace deprecated poly1305 (#13184)
Signed-off-by: tomholford <tomholford@users.noreply.github.com>
This commit is contained in:
parent
f95785f22b
commit
16bb541adb
@ -846,7 +846,7 @@ tailscale.com/cmd/k8s-operator dependencies: (generated by github.com/tailscale/
|
|||||||
golang.org/x/crypto/hkdf from crypto/tls+
|
golang.org/x/crypto/hkdf from crypto/tls+
|
||||||
golang.org/x/crypto/nacl/box from tailscale.com/types/key
|
golang.org/x/crypto/nacl/box from tailscale.com/types/key
|
||||||
golang.org/x/crypto/nacl/secretbox from golang.org/x/crypto/nacl/box
|
golang.org/x/crypto/nacl/secretbox from golang.org/x/crypto/nacl/box
|
||||||
golang.org/x/crypto/poly1305 from github.com/tailscale/wireguard-go/device+
|
golang.org/x/crypto/poly1305 from github.com/tailscale/wireguard-go/device
|
||||||
golang.org/x/crypto/salsa20/salsa from golang.org/x/crypto/nacl/box+
|
golang.org/x/crypto/salsa20/salsa from golang.org/x/crypto/nacl/box+
|
||||||
golang.org/x/exp/constraints from github.com/dblohm7/wingoes/pe+
|
golang.org/x/exp/constraints from github.com/dblohm7/wingoes/pe+
|
||||||
golang.org/x/exp/maps from sigs.k8s.io/controller-runtime/pkg/cache+
|
golang.org/x/exp/maps from sigs.k8s.io/controller-runtime/pkg/cache+
|
||||||
|
@ -438,7 +438,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
|
|||||||
golang.org/x/crypto/hkdf from crypto/tls+
|
golang.org/x/crypto/hkdf from crypto/tls+
|
||||||
golang.org/x/crypto/nacl/box from tailscale.com/types/key
|
golang.org/x/crypto/nacl/box from tailscale.com/types/key
|
||||||
golang.org/x/crypto/nacl/secretbox from golang.org/x/crypto/nacl/box
|
golang.org/x/crypto/nacl/secretbox from golang.org/x/crypto/nacl/box
|
||||||
golang.org/x/crypto/poly1305 from github.com/tailscale/wireguard-go/device+
|
golang.org/x/crypto/poly1305 from github.com/tailscale/wireguard-go/device
|
||||||
golang.org/x/crypto/salsa20/salsa from golang.org/x/crypto/nacl/box+
|
golang.org/x/crypto/salsa20/salsa from golang.org/x/crypto/nacl/box+
|
||||||
LD golang.org/x/crypto/ssh from github.com/pkg/sftp+
|
LD golang.org/x/crypto/ssh from github.com/pkg/sftp+
|
||||||
golang.org/x/exp/constraints from github.com/dblohm7/wingoes/pe+
|
golang.org/x/exp/constraints from github.com/dblohm7/wingoes/pe+
|
||||||
|
@ -20,7 +20,6 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.org/x/crypto/poly1305"
|
|
||||||
xmaps "golang.org/x/exp/maps"
|
xmaps "golang.org/x/exp/maps"
|
||||||
"golang.org/x/net/ipv4"
|
"golang.org/x/net/ipv4"
|
||||||
"golang.org/x/net/ipv6"
|
"golang.org/x/net/ipv6"
|
||||||
@ -1067,9 +1066,14 @@ func (de *endpoint) removeSentDiscoPingLocked(txid stun.TxID, sp sentPing, resul
|
|||||||
delete(de.sentPing, txid)
|
delete(de.sentPing, txid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// poly1305AuthenticatorSize is the size, in bytes, of a poly1305 authenticator.
|
||||||
|
// It's the same as golang.org/x/crypto/poly1305.TagSize, but that
|
||||||
|
// page is deprecated and we only need this one constant, so we copy it.
|
||||||
|
const poly1305AuthenticatorSize = 16
|
||||||
|
|
||||||
// discoPingSize is the size of a complete disco ping packet, without any padding.
|
// discoPingSize is the size of a complete disco ping packet, without any padding.
|
||||||
const discoPingSize = len(disco.Magic) + key.DiscoPublicRawLen + disco.NonceLen +
|
const discoPingSize = len(disco.Magic) + key.DiscoPublicRawLen + disco.NonceLen +
|
||||||
poly1305.TagSize + disco.MessageHeaderLen + disco.PingLen
|
poly1305AuthenticatorSize + disco.MessageHeaderLen + disco.PingLen
|
||||||
|
|
||||||
// sendDiscoPing sends a ping with the provided txid to ep using de's discoKey. size
|
// sendDiscoPing sends a ping with the provided txid to ep using de's discoKey. size
|
||||||
// is the desired disco message size, including all disco headers but excluding IP/UDP
|
// is the desired disco message size, including all disco headers but excluding IP/UDP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user