Skip to content

Commit fe5bfea

Browse files
committed
api: align api definition in go impl
Signed-off-by: Ruoyu Ying <[email protected]>
1 parent 86b0d49 commit fe5bfea

File tree

1 file changed

+4
-2
lines changed
  • common/golang/cctrusted_base

1 file changed

+4
-2
lines changed

common/golang/cctrusted_base/api.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ func (t CC_Type) String() string {
2727
}
2828

2929
type CCTrustedAPI interface {
30-
GetDefaultAlgorithm() TCG_ALG
30+
GetDefaultAlgorithm() (TCG_ALG, error)
3131

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

3535
GetMeasurementCount() (int, error)
3636
GetCCMeasurement(index int, alg TCG_ALG) (TcgDigest, error)
3737

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

0 commit comments

Comments
 (0)