diff options
| author | Joe Richey <joerichey@google.com> | 2017-03-02 11:47:07 -0800 |
|---|---|---|
| committer | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-05-02 13:39:18 -0700 |
| commit | 53d15f466a665e4e564af3afdcbcfe9ff1c91331 (patch) | |
| tree | f154df351d4a1df8c277015db7acd20517292f01 /metadata/policy_test.go | |
| parent | 20924ca06efba5a50356bdb5abb1f7b87f34f817 (diff) | |
crypto: insert key into keyring from go
This commit adds in the ability to insert Keys into the kernel keyring
from go code. This is done via a patched version of x/sys/unix. We
also expose the specific requirements for keys that will be placed in
the keyring, namely PolicyKeyLen. The legacy services are also exposed.
Change-Id: I177928c9aa676cae13b749042b9a3996e7490f68
Diffstat (limited to 'metadata/policy_test.go')
| -rw-r--r-- | metadata/policy_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/metadata/policy_test.go b/metadata/policy_test.go index 7f8a48b..593f3da 100644 --- a/metadata/policy_test.go +++ b/metadata/policy_test.go @@ -110,7 +110,7 @@ func TestSetPolicyFile(t *testing.T) { } // Tests that we fail when using bad policies -func TestSetPolicyBadIDs(t *testing.T) { +func TestSetPolicyBadDescriptors(t *testing.T) { // Policies that are too short, have invalid chars, or are too long badDescriptors := []string{"123456789abcde", "xxxxxxxxxxxxxxxx", "0123456789abcdef00"} for _, badDescriptor := range badDescriptors { @@ -121,7 +121,7 @@ func TestSetPolicyBadIDs(t *testing.T) { } if err = SetPolicy(directory, badPolicy); err == nil { - t.Errorf("id %q should have made SetPolicy fail", badDescriptor) + t.Errorf("descriptor %q should have made SetPolicy fail", badDescriptor) } os.RemoveAll(directory) } |