1 Star 0 Fork 0

mysnapcore/mygo-tpm2

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cmds_testing.go 951 Bytes
一键复制 编辑 原始数据 按行查看 历史
// Copyright 2019 Canonical Ltd.
// Licensed under the LGPLv3 with static-linking exception.
// See LICENCE file for details.
package tpm2
// Section 9 - Start-up
func (t *TPMContext) SelfTest(fullTest bool, sessions ...SessionContext) error {
return t.RunCommand(CommandSelfTest, sessions, Delimiter, fullTest)
}
func (t *TPMContext) IncrementalSelfTest(toTest AlgorithmList, sessions ...SessionContext) (AlgorithmList, error) {
var toDoList AlgorithmList
if err := t.RunCommand(CommandIncrementalSelfTest, sessions,
Delimiter,
toTest, Delimiter,
Delimiter,
&toDoList); err != nil {
return nil, err
}
return toDoList, nil
}
func (t *TPMContext) GetTestResult(sessions ...SessionContext) (outData MaxBuffer, testResult ResponseCode, err error) {
if err := t.RunCommand(CommandGetTestResult, sessions, Delimiter, Delimiter, Delimiter, &outData, &testResult); err != nil {
return nil, 0, err
}
return outData, testResult, nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mysnapcore/mygo-tpm2.git
git@gitee.com:mysnapcore/mygo-tpm2.git
mysnapcore
mygo-tpm2
mygo-tpm2
v0.0.6

搜索帮助