示例#1
0
文件: tpm.go 项目: krnowak/rkt
// AssignPolicy assigns a TSS policy to the TPM.
func (tpm *TPM) AssignPolicy(policy *Policy) error {
	err := tspiError(C.Tspi_Policy_AssignToObject(policy.handle, (C.TSS_HOBJECT)(tpm.handle)))
	return err
}
示例#2
0
文件: tpm.go 项目: carriercomm/pond
func (p *Policy) AssignTo(o *Object) error {
	if result := C.Tspi_Policy_AssignToObject(p.policy, o.handle); isError(result) {
		return Error{result}
	}
	return nil
}