We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b56e9ec commit 879be41Copy full SHA for 879be41
src/tpm2_pytss/policy.py
@@ -570,13 +570,16 @@ def get_calculated_json(self) -> bytes:
570
571
cjson = ffi.new("uint8_t[]", size[0])
572
_chkrc(lib.Tss2_PolicyGetCalculatedJSON(self._ctx, cjson, size))
573
+
574
return ffi.string(cjson, size[0])
575
576
@property
577
def description(self) -> bytes:
578
"""bytes: The policy description."""
- size = ffi.new("size_t *", 8096)
579
- desc = ffi.new("uint8_t[]", 8096)
+ size = ffi.new("size_t *")
580
+ _chkrc(lib.Tss2_PolicyGetDescription(self._ctx, ffi.NULL, size))
581
582
+ desc = ffi.new("uint8_t[]", size[0])
583
_chkrc(lib.Tss2_PolicyGetDescription(self._ctx, desc, size))
584
return ffi.string(desc, size[0])
585
0 commit comments