Skip to content

Commit

Permalink
api: align api definition in go impl
Browse files Browse the repository at this point in the history
Signed-off-by: Ruoyu Ying <[email protected]>
  • Loading branch information
Ruoyu-y committed Apr 1, 2024
1 parent 86b0d49 commit fe5bfea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/golang/cctrusted_base/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ func (t CC_Type) String() string {
}

type CCTrustedAPI interface {
GetDefaultAlgorithm() TCG_ALG
GetDefaultAlgorithm() (TCG_ALG, error)

GetCCReport(nonce, userData string, extraArgs any) (Report, error)
DumpCCReport(reportBytes []byte) error

GetMeasurementCount() (int, error)
GetCCMeasurement(index int, alg TCG_ALG) (TcgDigest, error)

GetCCEventLog(start, count int32) (*EventLogger, error)
// two optional params can be specified for GetCCEventLog()
// which are start and count
GetCCEventLog(params ...int32) ([]FormatedTcgEvent, error)
ReplayCCEventLog(formatedEventLogs []FormatedTcgEvent) map[int]map[TCG_ALG][]byte
}

0 comments on commit fe5bfea

Please sign in to comment.