// TakeOwnership transitions a TPM from unowned state to owned, installing the // encrypted key blob as the SRK. func (tpm *TPM) TakeOwnership(srk *Key) error { err := tspiError(C.Tspi_TPM_TakeOwnership(tpm.handle, srk.handle, 0)) return err }
func (c *Context) TakeOwnership(srk *RSA) error { if result := C.Tspi_TPM_TakeOwnership(c.tpm, C.TSS_HKEY(srk.handle), 0); isError(result) { return Error{result} } return nil }