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

Minor typo and formatting clean up #395

Merged
merged 1 commit into from
Feb 19, 2025
Merged
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 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