diff --git a/cmd/mesh-host/authority_test.go b/cmd/mesh-host/authority_test.go index 78bf7be..21b4f20 100644 --- a/cmd/mesh-host/authority_test.go +++ b/cmd/mesh-host/authority_test.go @@ -9,6 +9,7 @@ import ( "encoding/pem" "os" "path/filepath" + "strings" "testing" "time" @@ -73,7 +74,7 @@ func TestTheAppliedAuthorityIsKeptForTheRecord(t *testing.T) { if _, err := trust.Verify(delivery.KindEnrolment, msg, delivery.SignMessage(controller, enrol, msg)); err == nil { t.Error("a controller-signed message is accepted once the vault's key is read") } - if got := keys().Trusts; delivery.TrustsKey(got, delivery.SignerController, ctrlFP) || !delivery.TrustsKey(got, delivery.SignerVault, vaultFP) || + if got := keys().Trusts; strings.Contains(strings.Join(got, " "), ctrlFP) || !delivery.TrustsKey(got, delivery.SignerVault, vaultFP) || trust.VaultAuthority() != vaultCA || told != 2 { t.Errorf("after the signers are read the record trusts %v (told %d)", got, told) } diff --git a/internal/link/have.go b/internal/link/have.go index 020d06a..6f8040a 100644 --- a/internal/link/have.go +++ b/internal/link/have.go @@ -756,9 +756,8 @@ func (q *Session) NoteCandidates(ctx context.Context, answers map[string]deliver q.writeHaves(ctx, bus) } -// NoteComposes says, in the node's own key, whose compositions the node applies (delivery.ComposesOwn or -// delivery.ComposesController) and why: written at each start of its agent, so a node returning to the controller's -// compositions says so where every have is read (issue 1126). +// NoteComposes says, in the node's own key, whose compositions the node applies (delivery.ComposesOwn) and why: written +// at each start of its agent, where every have is read (issue 1126). func (q *Session) NoteComposes(ctx context.Context, composes, why string) { q.init() s := &q.haves