Ejemplo n.º 1
0
Archivo: tpm.go Proyecto: krnowak/rkt
// 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
}
Ejemplo n.º 2
0
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
}