Skip to content

Commit

Permalink
Merge branch 'chipsalliance:main' into derivechild_support
Browse files Browse the repository at this point in the history
  • Loading branch information
hpya93 authored Dec 22, 2023
2 parents 28f22bd + bdb03a7 commit 161dd17
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion simulator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DPE Simulator

The DPE simulator is a userspace simulator which serves as a DPE intance.
The DPE simulator is a userspace simulator which serves as a DPE instance.

## Transport

Expand Down
8 changes: 4 additions & 4 deletions verification/certifyKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type TcgUeidExtension struct {
Ueid []uint8 `asn1:"ueid,implicit"`
}

// Fwid represents a TCG DICE FWID stucture
// Fwid represents a TCG DICE FWID structure
type Fwid struct {
HashAlg asn1.ObjectIdentifier
Digest []byte
Expand Down Expand Up @@ -114,7 +114,7 @@ const (
// TcgMultiTcbInfo represents a sequence of TCBInfos
type TcgMultiTcbInfo = []DiceTcbInfo

// CertifyKeyParams holds configurable paramters to CertifyKey for test-cases
// CertifyKeyParams holds configurable parameters to CertifyKey for test-cases
type CertifyKeyParams struct {
Label []byte
Flags CertifyKeyFlags
Expand Down Expand Up @@ -208,7 +208,7 @@ func TestCertifyKeyCsr(d TestDPEInstance, c DPEClient, t *testing.T) {
}

// Ignores critical extensions that are unknown to x509 package
// but atleast defined in DPE certificate profile specification.
// but at least defined in DPE certificate profile specification.
// UnhandledCriticalExtensions may have only custom extensions mentioned in spec
// unknownExtnMap collects extensions unknown to both x509 and the DICE certificate profiles spec.
// positive case expects the unknownExtnMap to be empty.
Expand Down Expand Up @@ -241,7 +241,7 @@ func removeTcgDiceCriticalExtensions(t *testing.T, certs []*x509.Certificate) {
}

// Ignores extended key usages that are unknown to x509 package
// but atleast defined in DPE certificate profile specification.
// but at least defined in DPE certificate profile specification.
// UnhandledExtendedKeyUsages may have only custom key usages mentioned in spec
// unknownKeyUsagesMap collects keyusages unknown to both x509 and the DICE certificate profiles spec.
// positive case expects the unknownKeyUsagesMap to be empty.
Expand Down
2 changes: 1 addition & 1 deletion verification/certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func getTcbInfoForHandle(c DPEClient, handle *ContextHandle) (*ContextHandle, Di
}

if len(multiTcbInfo) == 0 {
return outHandle, DiceTcbInfo{}, fmt.Errorf("Certificate MutliTcbInfo is empty")
return outHandle, DiceTcbInfo{}, fmt.Errorf("Certificate MultiTcbInfo is empty")
}

return outHandle, multiTcbInfo[0], nil
Expand Down
2 changes: 1 addition & 1 deletion verification/getCertificateChain.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func validateCertChain(t *testing.T, certChain []*x509.Certificate) {
t.Errorf("[ERROR]: Error in Certificate Chain of %s: %s", cert.Subject, err.Error())
}

// Log certificate chains linked to each cetificate in chain
// Log certificate chains linked to each certificate in chain
if len(chains) != 1 {
t.Errorf("[ERROR]: validateCertChain certificate chain is empty")
}
Expand Down
2 changes: 1 addition & 1 deletion verification/negativeCases.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestUnsupportedCommand(d TestDPEInstance, c DPEClient, t *testing.T) {
// command flags that are turned off in DPE.
// The DPE command may be available but some of its flags may not be supported by DPE.
// DPE profile supports the below attributes.
// Simulation : Allows caller to request for context iniitialization in simulation mode
// Simulation : Allows caller to request for context initialization in simulation mode
// IsCA : Allows caller to request the key cert of CA
// Csr : Allows caller to request the key cert in CSR format
// X509 : Allows caller to request the key cert in X509 format
Expand Down
2 changes: 1 addition & 1 deletion verification/simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (s *DpeSimulator) GetSupportedLocalities() []uint32 {
return []uint32{DPESimulatorAutoInitLocality, DPESimulatorOtherLocality}
}

// HasLocalityControl returns whehter the simulator can artificially set the
// HasLocalityControl returns whether the simulator can artificially set the
// locality of the caller. The simulator target can always control the locality.
func (s *DpeSimulator) HasLocalityControl() bool {
return true
Expand Down
7 changes: 6 additions & 1 deletion verification/verification.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// Licensed under the Apache-2.0 license

// Package verification provides verification tests for implementations of the DPE iRoT profile.
//
// This packages also includes a modular DPE client that can be used to
// communicate with DPE over different transports. A transport for the DPE
// rust simulator is provided in this package.
package verification

import (
Expand Down Expand Up @@ -86,7 +91,7 @@ var UnsupportedCommand = TestCase{

// UnsupportedCommandFlag tests calling unsupported commands flags
var UnsupportedCommandFlag = TestCase{
"CheckSupportForCommmandFlag", TestUnsupportedCommandFlag, []string{"AutoInit", "RotateContext", "ExtendTci"},
"CheckSupportForCommandFlag", TestUnsupportedCommandFlag, []string{"AutoInit", "RotateContext", "ExtendTci"},
}

// RotateContextTestCase tests RotateContext
Expand Down

0 comments on commit 161dd17

Please sign in to comment.