tka,types/key: remove dependency for tailcfg & types/ packages on tka
Following the pattern elsewhere, we create a new tka-specific types package for the types that need to couple between the serialized structure types, and tka. Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
@ -15,6 +15,7 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"tailscale.com/types/tkatype"
|
||||
)
|
||||
|
||||
// chaintest_test.go implements test helpers for concisely describing
|
||||
@ -265,7 +266,7 @@ func (c *testChain) makeAUM(v *testchainNode) AUM {
|
||||
|
||||
sigHash := aum.SigHash()
|
||||
for _, key := range c.SignAllKeys {
|
||||
aum.Signatures = append(aum.Signatures, Signature{
|
||||
aum.Signatures = append(aum.Signatures, tkatype.Signature{
|
||||
KeyID: c.Key[key].ID(),
|
||||
Signature: ed25519.Sign(c.KeyPrivs[key], sigHash[:]),
|
||||
})
|
||||
@ -274,7 +275,7 @@ func (c *testChain) makeAUM(v *testchainNode) AUM {
|
||||
// If the aum was specified as being signed by some key, then
|
||||
// sign it using that key.
|
||||
if key := v.SignedWith; key != "" {
|
||||
aum.Signatures = append(aum.Signatures, Signature{
|
||||
aum.Signatures = append(aum.Signatures, tkatype.Signature{
|
||||
KeyID: c.Key[key].ID(),
|
||||
Signature: ed25519.Sign(c.KeyPrivs[key], sigHash[:]),
|
||||
})
|
||||
|
Reference in New Issue
Block a user