Example #1
0
    def test_persistent_parent_rsa(self):
        insens = TPM2B_SENSITIVE_CREATE()
        inpublic = TPM2B_PUBLIC(publicArea=parent_rsa_template)
        parent, _, _, _, _ = self.ectx.CreatePrimary(insens, inpublic)
        phandle = self.ectx.EvictControl(
            ESYS_TR.RH_OWNER, parent, 0x81000081, session1=ESYS_TR.PASSWORD
        )

        key = TSSPrivKey.create_rsa(self.ectx, parent=0x81000081)
        key.load(self.ectx)
        self.assertEqual(key.parent, 0x81000081)
Example #2
0
 def test_create_load_rsa(self):
     key = TSSPrivKey.create_rsa(self.ectx)
     key.load(self.ectx)