// 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 }
func (p *Policy) AssignTo(o *Object) error { if result := C.Tspi_Policy_AssignToObject(p.policy, o.handle); isError(result) { return Error{result} } return nil }