Below script fails with the error below
#!/usr/bin/env python3
import tpm2_pytss
if '__main__' == __name__:
jpol1 = """{
"name": "lab 6B policy",
"description": "requested by Bill Roberts",
"policy":
[
{
"type": "PCR",
"currentpcrs": [
"""
jpol2a = "16"
jpol2b = """
{ "hashAlg": "sha256", "pcr": 16, }
"""
jpol3 = """
]
}
]
}"""
print("A")
pol6b1 = tpm2_pytss.policy(''.join((jpol1,jpol2a,jpol3)), tpm2_pytss.TPM2_ALG.SHA256)
print("B")
pol6b2 = tpm2_pytss.policy(''.join((jpol1,jpol2b,jpol3)), tpm2_pytss.TPM2_ALG.SHA256)
print("C")
ERROR:fapijson:src/tss2-fapi/tpm_json_deserialize.c:258:get_number_from_json() Bad value
ERROR:fapijson:src/tss2-fapi/tpm_json_deserialize.c:321:ifapi_json_pcr_selection_deserialize() Bad PCR value ErrorCode (0x0006000b)
ERROR:fapijson:src/tss2-fapi/ifapi_policy_json_deserialize.c:1300:ifapi_json_TPMS_POLICYPCR_deserialize() Bad value for field "currentPCRs". ErrorCode (0x0006000b)
ERROR:fapijson:src/tss2-fapi/ifapi_policy_json_deserialize.c:1700:ifapi_json_TPMT_POLICYELEMENT_deserialize() Bad value for field "element". ErrorCode (0x0006000b)
ERROR:fapijson:src/tss2-fapi/ifapi_policy_json_deserialize.c:1734:ifapi_json_TPML_POLICYELEMENTS_deserialize() TPMT_POLICYELEMENT_deserialize ErrorCode (0x0006000b)
ERROR:fapijson:src/tss2-fapi/ifapi_policy_json_deserialize.c:1802:ifapi_json_TPMS_POLICY_deserialize() Bad value for field "policy". ErrorCode (0x0006000b)
ERROR:"policy":src/tss2-policy/tss2_policy.c:93:Tss2_PolicyInit() Deserialize policy ErrorCode (0x0006000b)
Traceback (most recent call last):
The question is why that error, is it right? Need to investigate this.
Below script fails with the error below
The question is why that error, is it right? Need to investigate this.