diff options
| author | Tom DNetto <tom@tailscale.com> | 2023-03-01 12:47:29 -0800 |
|---|---|---|
| committer | Tom <twitchyliquid64@users.noreply.github.com> | 2023-03-03 10:09:05 -1000 |
| commit | e2d652ec4dc53dce6c828e0128126ac7db2d6b09 (patch) | |
| tree | 9730760bef0b07ef999b931a3f398d9cccb0a49c /client | |
| parent | 3f8e8b04fd4e32f63b2b8c4bc0f9ad5695d2bb20 (diff) | |
| download | tailscale-e2d652ec4dc53dce6c828e0128126ac7db2d6b09.tar.xz tailscale-e2d652ec4dc53dce6c828e0128126ac7db2d6b09.zip | |
ipn,cmd/tailscale: implement resigning nodes on tka key removal
Signed-off-by: Tom DNetto <tom@tailscale.com>
Diffstat (limited to 'client')
| -rw-r--r-- | client/tailscale/localclient.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/tailscale/localclient.go b/client/tailscale/localclient.go index 12eb907e1..90b4e9688 100644 --- a/client/tailscale/localclient.go +++ b/client/tailscale/localclient.go @@ -36,6 +36,7 @@ import ( "tailscale.com/tailcfg" "tailscale.com/tka" "tailscale.com/types/key" + "tailscale.com/types/tkatype" ) // defaultLocalClient is the default LocalClient when using the legacy @@ -886,6 +887,15 @@ func (lc *LocalClient) NetworkLockSign(ctx context.Context, nodeKey key.NodePubl return nil } +// NetworkLockAffectedSigs returns all signatures signed by the specified keyID. +func (lc *LocalClient) NetworkLockAffectedSigs(ctx context.Context, keyID tkatype.KeyID) ([]tkatype.MarshaledSignature, error) { + body, err := lc.send(ctx, "POST", "/localapi/v0/tka/affected-sigs", 200, bytes.NewReader(keyID)) + if err != nil { + return nil, fmt.Errorf("error: %w", err) + } + return decodeJSON[[]tkatype.MarshaledSignature](body) +} + // NetworkLockLog returns up to maxEntries number of changes to network-lock state. func (lc *LocalClient) NetworkLockLog(ctx context.Context, maxEntries int) ([]ipnstate.NetworkLockUpdate, error) { v := url.Values{} |
