mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 16:11:23 +00:00
client,cmd/tailscale,ipn,tka,types: implement tka initialization flow
This PR implements the client-side of initializing network-lock with the Coordination server. Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
@@ -82,7 +82,7 @@ func (k NLPrivate) KeyID() tkatype.KeyID {
|
||||
return pub[:]
|
||||
}
|
||||
|
||||
// SignAUM implements tka.UpdateSigner.
|
||||
// SignAUM implements tka.Signer.
|
||||
func (k NLPrivate) SignAUM(sigHash tkatype.AUMSigHash) ([]tkatype.Signature, error) {
|
||||
return []tkatype.Signature{{
|
||||
KeyID: k.KeyID(),
|
||||
@@ -90,6 +90,11 @@ func (k NLPrivate) SignAUM(sigHash tkatype.AUMSigHash) ([]tkatype.Signature, err
|
||||
}}, nil
|
||||
}
|
||||
|
||||
// SignNKS signs the tka.NodeKeySignature identified by sigHash.
|
||||
func (k NLPrivate) SignNKS(sigHash tkatype.NKSSigHash) ([]byte, error) {
|
||||
return ed25519.Sign(ed25519.PrivateKey(k.k[:]), sigHash[:]), nil
|
||||
}
|
||||
|
||||
// NLPublic is the public portion of a a NLPrivate.
|
||||
type NLPublic struct {
|
||||
k [ed25519.PublicKeySize]byte
|
||||
|
Reference in New Issue
Block a user