Skip to content

Commit

Permalink
Resolved all outstanding nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Tsai committed Jul 13, 2022
1 parent e60193e commit 5c952d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions direct/tpm2/certify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestCertify(t *testing.T) {
defer flushContextSigner.Execute(thetpm)

createPrimarySubject := CreatePrimary{
PrimaryHandle: tpm.RHPlatform,
PrimaryHandle: tpm.RHOwner,
InSensitive: tpm2b.SensitiveCreate{
Sensitive: tpms.SensitiveCreate{
UserAuth: tpm2b.Auth{
Expand All @@ -99,6 +99,12 @@ func TestCertify(t *testing.T) {
InPublic: public,
CreationPCR: pcrSelection,
}
uniqueIdentifier := tpmu.PublicID{
KeyedHash: &tpm2b.Digest{
Buffer: decodeHex(t, "ed4fe8e2bff97665e7bfbe27c2365d07a9be91dd92d997cd91cc706b6074eb08"),
},
}
createPrimarySubject.InPublic.PublicArea.Unique = uniqueIdentifier
rspSubject, err := createPrimarySubject.Execute(thetpm)
if err != nil {
t.Fatalf("Failed to create primary: %v", err)
Expand All @@ -118,7 +124,7 @@ func TestCertify(t *testing.T) {
Auth: PasswordAuth(Auth),
},
QualifyingData: tpm2b.Data{
Buffer: nil,
Buffer: make([]byte, 16),
},
InScheme: tpmt.SigScheme{
Scheme: tpm.AlgNull,
Expand Down

0 comments on commit 5c952d0

Please sign in to comment.