Skip to content

Commit

Permalink
Minor typo and formatting clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquelinewong authored and jhand2 committed Feb 19, 2025
1 parent 8891d1f commit ba301b2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion verification/testing/deriveContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func computeExpectedCumulative(lastCumulative []byte, tciValue []byte) []byte {
}

func verifyMeasurements(c client.DPEClient, t *testing.T, handle *client.ContextHandle, expectedCurrent []byte, expectedCumulative []byte) {
handle, tcbInfo, err := getTcbInfoForHandle(c, handle)
_, tcbInfo, err := getTcbInfoForHandle(c, handle)
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions verification/testing/negativeCases.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ func TestUnsupportedCommandFlag(d client.TestDPEInstance, c client.DPEClient, t
t.Errorf("[ERROR]: Incorrect error type. InternalInfo is not supported by DPE, DeriveContext should return %q, but returned %q", client.StatusArgumentNotSupported, err)
}

// Check whether error is returned since InternalDice usgae is unsupported by DPE profile
// Check whether error is returned since InternalDice usage is unsupported by DPE profile
if _, err := c.DeriveContext(handle, make([]byte, digestLen), client.DeriveContextFlags(client.InternalInputDice), 0, 0); err == nil {
t.Errorf("[ERROR]:InternalDice is not supported by DPE, DeriveContext should return %q, but returned no error", client.StatusArgumentNotSupported)
} else if !errors.Is(err, client.StatusArgumentNotSupported) {
t.Errorf("[ERROR]: Incorrect error type. InternalDice is not supported by DPE, DeriveContext should return %q, but returned %q", client.StatusArgumentNotSupported, err)
}

// Check whether error is returned since InternalDice usgae is unsupported by DPE profile
// Check whether error is returned since InternalDice usage is unsupported by DPE profile
if _, err := c.DeriveContext(handle, make([]byte, digestLen), client.DeriveContextFlags(client.InputAllowX509), 0, 0); err == nil {
t.Errorf("[ERROR]:X509 is not supported by DPE, DeriveContext should return %q, but returned no error", client.StatusArgumentNotSupported)
} else if !errors.Is(err, client.StatusArgumentNotSupported) {
Expand Down
2 changes: 1 addition & 1 deletion verification/testing/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestAsymmetricSigning(d client.TestDPEInstance, c client.DPEClient, t *test
}
}

// TestSignSimulation cheks command fails in simulated context because this context does not allow signing.
// TestSignSimulation checks command fails in simulated context because this context does not allow signing.
// This is because simulation context does not allow using context's private key.
func TestSignSimulation(d client.TestDPEInstance, c client.DPEClient, t *testing.T) {
useSimulation := true
Expand Down
2 changes: 1 addition & 1 deletion verification/testing/tpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestTpmPolicySigning(d dpe.TestDPEInstance, c dpe.DPEClient, t *testing.T)
ec = tpm2.CurveNISTP384
}

//Create tpm auth session to get nonce and form label which is digest
// Create tpm auth session to get nonce and form label which is digest
tpm, err := simulator.Get()
if err != nil {
t.Fatalf("[FATAL]: Can't open TPM")
Expand Down

0 comments on commit ba301b2

Please sign in to comment.