Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the TPM error when the public part of the elliptic key is invalid *debug only PR* #146

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/testutil/suites.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (b *TPMTestBase) setUpTestBase(c *C, tpm *secboot.TPMConnection) {
hc, err = b.TPM.CreateResourceContextFromTPM(h)
c.Check(err, IsNil)
case tpm2.HandleTypeHMACSession:
hc = tpm2.CreateIncompleteSessionContext(h)
hc = tpm2.CreatePartialHandleContext(h)
default:
c.Fatalf("Unexpected handle type")
}
Expand Down
2 changes: 1 addition & 1 deletion policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ func executePolicySession(tpm *tpm2.TPMContext, policySession tpm2.SessionContex
if err != nil {
if tpm2.IsTPMParameterError(err, tpm2.AnyErrorCode, tpm2.CommandLoadExternal, 2) {
// staticInput.AuthPublicKey is invalid
return staticPolicyDataError{errors.New("public area of dynamic authorization policy signing key is invalid")}
return staticPolicyDataError{xerrors.Errorf("public area of dynamic authorization policy signing key is invalid: %w", err)}
}
return xerrors.Errorf("cannot load public area for dynamic authorization policy signing key: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"revisionTime": "2021-03-12T20:55:53Z"
},
{
"checksumSHA1": "HeHu/+gGhFD5UH8iApKz14DxJaw=",
"checksumSHA1": "UYqZjF/41DZxSoSdAOnYlL1yrKQ=",
"path": "github.com/canonical/go-tpm2",
"revision": "14cc20cfdf983fc6894fce8659c40acf3e6d3a73",
"revisionTime": "2021-01-29T14:51:58Z"
"revision": "3926e4dcfeedab70d07ebd55425f8283b18f4a20",
"revisionTime": "2021-04-29T19:17:09Z"
},
{
"checksumSHA1": "bT/rC7K8St3lNRXf/XJGpB4wNJU=",
Expand Down