Lines Matching refs:jso2
348 json_object *jso2; in ifapi_json_TPMS_PCR_SELECTION_deserialize() local
352 if (!ifapi_get_sub_object(jso, "hash", &jso2)) { in ifapi_json_TPMS_PCR_SELECTION_deserialize()
356 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->hash); in ifapi_json_TPMS_PCR_SELECTION_deserialize()
359 if (!ifapi_get_sub_object(jso, "pcrSelect", &jso2)) { in ifapi_json_TPMS_PCR_SELECTION_deserialize()
363 return ifapi_json_pcr_selection_deserialize(jso2, &out->sizeofSelect, in ifapi_json_TPMS_PCR_SELECTION_deserialize()
386 json_object *jso2 = json_object_array_get_idx(jso, i); in ifapi_json_BYTE_array_deserialize() local
387 TSS2_RC r = ifapi_json_BYTE_deserialize(jso2, &out[i]); in ifapi_json_BYTE_array_deserialize()
1014 json_object *jso2 = json_object_array_get_idx(jso, i); in ifapi_json_TPMA_OBJECT_deserialize() local
1015 const char *token = strip_prefix(json_object_get_string(jso2), in ifapi_json_TPMA_OBJECT_deserialize()
1028 LOG_ERROR("Unknown value: %s", json_object_get_string(jso2)); in ifapi_json_TPMA_OBJECT_deserialize()
1098 json_object *jso2 = json_object_array_get_idx(jso, i); in ifapi_json_TPMA_LOCALITY_deserialize() local
1099 const char *token = strip_prefix(json_object_get_string(jso2), in ifapi_json_TPMA_LOCALITY_deserialize()
1113 LOG_ERROR("Unknown value: %s", json_object_get_string(jso2)); in ifapi_json_TPMA_LOCALITY_deserialize()
1399 json_object *jso2; in ifapi_json_TPMT_HA_deserialize() local
1404 if (!ifapi_get_sub_object(jso, "hashAlg", &jso2)) { in ifapi_json_TPMT_HA_deserialize()
1408 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->hashAlg); in ifapi_json_TPMT_HA_deserialize()
1411 if (!ifapi_get_sub_object(jso, "digest", &jso2)) { in ifapi_json_TPMT_HA_deserialize()
1415 r = ifapi_json_TPMU_HA_deserialize(out->hashAlg, jso2, &out->digest); in ifapi_json_TPMT_HA_deserialize()
1599 json_object *jso2; in ifapi_json_TPMT_TK_CREATION_deserialize() local
1604 if (!ifapi_get_sub_object(jso, "tag", &jso2)) { in ifapi_json_TPMT_TK_CREATION_deserialize()
1608 r = ifapi_json_TPM2_ST_deserialize(jso2, &out->tag); in ifapi_json_TPMT_TK_CREATION_deserialize()
1614 if (!ifapi_get_sub_object(jso, "hierarchy", &jso2)) { in ifapi_json_TPMT_TK_CREATION_deserialize()
1618 r = ifapi_json_TPMI_RH_HIERARCHY_deserialize(jso2, &out->hierarchy); in ifapi_json_TPMT_TK_CREATION_deserialize()
1621 if (!ifapi_get_sub_object(jso, "digest", &jso2)) { in ifapi_json_TPMT_TK_CREATION_deserialize()
1625 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->digest); in ifapi_json_TPMT_TK_CREATION_deserialize()
1643 json_object *jso2; in ifapi_json_TPMT_TK_VERIFIED_deserialize() local
1648 if (!ifapi_get_sub_object(jso, "tag", &jso2)) { in ifapi_json_TPMT_TK_VERIFIED_deserialize()
1652 r = ifapi_json_TPM2_ST_deserialize(jso2, &out->tag); in ifapi_json_TPMT_TK_VERIFIED_deserialize()
1658 if (!ifapi_get_sub_object(jso, "hierarchy", &jso2)) { in ifapi_json_TPMT_TK_VERIFIED_deserialize()
1662 r = ifapi_json_TPMI_RH_HIERARCHY_deserialize(jso2, &out->hierarchy); in ifapi_json_TPMT_TK_VERIFIED_deserialize()
1665 if (!ifapi_get_sub_object(jso, "digest", &jso2)) { in ifapi_json_TPMT_TK_VERIFIED_deserialize()
1669 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->digest); in ifapi_json_TPMT_TK_VERIFIED_deserialize()
1768 json_object *jso2; in ifapi_json_TPMS_CLOCK_INFO_deserialize() local
1773 if (!ifapi_get_sub_object(jso, "clock", &jso2)) { in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1777 r = ifapi_json_UINT64_deserialize(jso2, &out->clock); in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1780 if (!ifapi_get_sub_object(jso, "resetCount", &jso2)) { in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1784 r = ifapi_json_UINT32_deserialize(jso2, &out->resetCount); in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1787 if (!ifapi_get_sub_object(jso, "restartCount", &jso2)) { in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1791 r = ifapi_json_UINT32_deserialize(jso2, &out->restartCount); in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1794 if (!ifapi_get_sub_object(jso, "safe", &jso2)) { in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1798 r = ifapi_json_TPMI_YES_NO_deserialize(jso2, &out->safe); in ifapi_json_TPMS_CLOCK_INFO_deserialize()
1815 json_object *jso2; in ifapi_json_TPMS_TIME_INFO_deserialize() local
1820 if (!ifapi_get_sub_object(jso, "time", &jso2)) { in ifapi_json_TPMS_TIME_INFO_deserialize()
1824 r = ifapi_json_UINT64_deserialize(jso2, &out->time); in ifapi_json_TPMS_TIME_INFO_deserialize()
1827 if (!ifapi_get_sub_object(jso, "clockInfo", &jso2)) { in ifapi_json_TPMS_TIME_INFO_deserialize()
1831 r = ifapi_json_TPMS_CLOCK_INFO_deserialize(jso2, &out->clockInfo); in ifapi_json_TPMS_TIME_INFO_deserialize()
1849 json_object *jso2; in ifapi_json_TPMS_TIME_ATTEST_INFO_deserialize() local
1854 if (!ifapi_get_sub_object(jso, "time", &jso2)) { in ifapi_json_TPMS_TIME_ATTEST_INFO_deserialize()
1858 r = ifapi_json_TPMS_TIME_INFO_deserialize(jso2, &out->time); in ifapi_json_TPMS_TIME_ATTEST_INFO_deserialize()
1861 if (!ifapi_get_sub_object(jso, "firmwareVersion", &jso2)) { in ifapi_json_TPMS_TIME_ATTEST_INFO_deserialize()
1865 r = ifapi_json_UINT64_deserialize(jso2, &out->firmwareVersion); in ifapi_json_TPMS_TIME_ATTEST_INFO_deserialize()
1883 json_object *jso2; in ifapi_json_TPMS_CERTIFY_INFO_deserialize() local
1888 if (!ifapi_get_sub_object(jso, "name", &jso2)) { in ifapi_json_TPMS_CERTIFY_INFO_deserialize()
1892 r = ifapi_json_TPM2B_NAME_deserialize(jso2, &out->name); in ifapi_json_TPMS_CERTIFY_INFO_deserialize()
1895 if (!ifapi_get_sub_object(jso, "qualifiedName", &jso2)) { in ifapi_json_TPMS_CERTIFY_INFO_deserialize()
1899 r = ifapi_json_TPM2B_NAME_deserialize(jso2, &out->qualifiedName); in ifapi_json_TPMS_CERTIFY_INFO_deserialize()
1916 json_object *jso2; in ifapi_json_TPMS_QUOTE_INFO_deserialize() local
1921 if (!ifapi_get_sub_object(jso, "pcrSelect", &jso2)) { in ifapi_json_TPMS_QUOTE_INFO_deserialize()
1925 r = ifapi_json_TPML_PCR_SELECTION_deserialize(jso2, &out->pcrSelect); in ifapi_json_TPMS_QUOTE_INFO_deserialize()
1928 if (!ifapi_get_sub_object(jso, "pcrDigest", &jso2)) { in ifapi_json_TPMS_QUOTE_INFO_deserialize()
1932 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->pcrDigest); in ifapi_json_TPMS_QUOTE_INFO_deserialize()
1950 json_object *jso2; in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize() local
1955 if (!ifapi_get_sub_object(jso, "auditCounter", &jso2)) { in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1959 r = ifapi_json_UINT64_deserialize(jso2, &out->auditCounter); in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1962 if (!ifapi_get_sub_object(jso, "digestAlg", &jso2)) { in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1966 r = ifapi_json_TPM2_ALG_ID_deserialize(jso2, &out->digestAlg); in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1969 if (!ifapi_get_sub_object(jso, "auditDigest", &jso2)) { in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1973 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->auditDigest); in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1976 if (!ifapi_get_sub_object(jso, "commandDigest", &jso2)) { in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1980 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->commandDigest); in ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize()
1998 json_object *jso2; in ifapi_json_TPMS_SESSION_AUDIT_INFO_deserialize() local
2003 if (!ifapi_get_sub_object(jso, "exclusiveSession", &jso2)) { in ifapi_json_TPMS_SESSION_AUDIT_INFO_deserialize()
2007 r = ifapi_json_TPMI_YES_NO_deserialize(jso2, &out->exclusiveSession); in ifapi_json_TPMS_SESSION_AUDIT_INFO_deserialize()
2010 if (!ifapi_get_sub_object(jso, "sessionDigest", &jso2)) { in ifapi_json_TPMS_SESSION_AUDIT_INFO_deserialize()
2014 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->sessionDigest); in ifapi_json_TPMS_SESSION_AUDIT_INFO_deserialize()
2032 json_object *jso2; in ifapi_json_TPMS_CREATION_INFO_deserialize() local
2037 if (!ifapi_get_sub_object(jso, "objectName", &jso2)) { in ifapi_json_TPMS_CREATION_INFO_deserialize()
2041 r = ifapi_json_TPM2B_NAME_deserialize(jso2, &out->objectName); in ifapi_json_TPMS_CREATION_INFO_deserialize()
2044 if (!ifapi_get_sub_object(jso, "creationHash", &jso2)) { in ifapi_json_TPMS_CREATION_INFO_deserialize()
2048 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->creationHash); in ifapi_json_TPMS_CREATION_INFO_deserialize()
2066 json_object *jso2; in ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize() local
2071 if (!ifapi_get_sub_object(jso, "indexName", &jso2)) { in ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize()
2075 r = ifapi_json_TPM2B_NAME_deserialize(jso2, &out->indexName); in ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize()
2078 if (!ifapi_get_sub_object(jso, "offset", &jso2)) { in ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize()
2082 r = ifapi_json_UINT16_deserialize(jso2, &out->offset); in ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize()
2085 if (!ifapi_get_sub_object(jso, "nvContents", &jso2)) { in ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize()
2089 r = ifapi_json_TPM2B_MAX_NV_BUFFER_deserialize(jso2, &out->nvContents); in ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize()
2160 json_object *jso2; in ifapi_json_TPMS_ATTEST_deserialize() local
2165 if (!ifapi_get_sub_object(jso, "magic", &jso2)) { in ifapi_json_TPMS_ATTEST_deserialize()
2169 r = ifapi_json_TPM2_GENERATED_deserialize(jso2, &out->magic); in ifapi_json_TPMS_ATTEST_deserialize()
2172 if (!ifapi_get_sub_object(jso, "type", &jso2)) { in ifapi_json_TPMS_ATTEST_deserialize()
2176 r = ifapi_json_TPMI_ST_ATTEST_deserialize(jso2, &out->type); in ifapi_json_TPMS_ATTEST_deserialize()
2179 if (!ifapi_get_sub_object(jso, "qualifiedSigner", &jso2)) { in ifapi_json_TPMS_ATTEST_deserialize()
2183 r = ifapi_json_TPM2B_NAME_deserialize(jso2, &out->qualifiedSigner); in ifapi_json_TPMS_ATTEST_deserialize()
2186 if (!ifapi_get_sub_object(jso, "extraData", &jso2)) { in ifapi_json_TPMS_ATTEST_deserialize()
2190 r = ifapi_json_TPM2B_DATA_deserialize(jso2, &out->extraData); in ifapi_json_TPMS_ATTEST_deserialize()
2193 if (!ifapi_get_sub_object(jso, "clockInfo", &jso2)) { in ifapi_json_TPMS_ATTEST_deserialize()
2197 r = ifapi_json_TPMS_CLOCK_INFO_deserialize(jso2, &out->clockInfo); in ifapi_json_TPMS_ATTEST_deserialize()
2200 if (!ifapi_get_sub_object(jso, "firmwareVersion", &jso2)) { in ifapi_json_TPMS_ATTEST_deserialize()
2204 r = ifapi_json_UINT64_deserialize(jso2, &out->firmwareVersion); in ifapi_json_TPMS_ATTEST_deserialize()
2206 if (!ifapi_get_sub_object(jso, "attested", &jso2)) { in ifapi_json_TPMS_ATTEST_deserialize()
2210 r = ifapi_json_TPMU_ATTEST_deserialize(out->type, jso2, &out->attested); in ifapi_json_TPMS_ATTEST_deserialize()
2300 json_object *jso2; in ifapi_json_TPMT_SYM_DEF_deserialize() local
2305 if (!ifapi_get_sub_object(jso, "algorithm", &jso2)) { in ifapi_json_TPMT_SYM_DEF_deserialize()
2309 r = ifapi_json_TPMI_ALG_SYM_deserialize(jso2, &out->algorithm); in ifapi_json_TPMT_SYM_DEF_deserialize()
2312 if (!ifapi_get_sub_object(jso, "keyBits", &jso2)) { in ifapi_json_TPMT_SYM_DEF_deserialize()
2316 r = ifapi_json_TPMU_SYM_KEY_BITS_deserialize(out->algorithm, jso2, in ifapi_json_TPMT_SYM_DEF_deserialize()
2322 if (!ifapi_get_sub_object(jso, "mode", &jso2)) { in ifapi_json_TPMT_SYM_DEF_deserialize()
2326 r = ifapi_json_TPMU_SYM_MODE_deserialize(out->algorithm, jso2, &out->mode); in ifapi_json_TPMT_SYM_DEF_deserialize()
2346 json_object *jso2; in ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize() local
2351 if (!ifapi_get_sub_object(jso, "algorithm", &jso2)) { in ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize()
2355 r = ifapi_json_TPMI_ALG_SYM_OBJECT_deserialize(jso2, &out->algorithm); in ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize()
2358 if (!ifapi_get_sub_object(jso, "keyBits", &jso2)) { in ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize()
2362 r = ifapi_json_TPMU_SYM_KEY_BITS_deserialize(out->algorithm, jso2, in ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize()
2368 if (!ifapi_get_sub_object(jso, "mode", &jso2)) { in ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize()
2372 r = ifapi_json_TPMU_SYM_MODE_deserialize(out->algorithm, jso2, &out->mode); in ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize()
2392 json_object *jso2; in ifapi_json_TPMS_SYMCIPHER_PARMS_deserialize() local
2397 if (!ifapi_get_sub_object(jso, "sym", &jso2)) { in ifapi_json_TPMS_SYMCIPHER_PARMS_deserialize()
2401 r = ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize(jso2, &out->sym); in ifapi_json_TPMS_SYMCIPHER_PARMS_deserialize()
2419 json_object *jso2; in ifapi_json_TPMS_SCHEME_HASH_deserialize() local
2424 if (!ifapi_get_sub_object(jso, "hashAlg", &jso2)) { in ifapi_json_TPMS_SCHEME_HASH_deserialize()
2428 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->hashAlg); in ifapi_json_TPMS_SCHEME_HASH_deserialize()
2446 json_object *jso2; in ifapi_json_TPMS_SCHEME_ECDAA_deserialize() local
2451 if (!ifapi_get_sub_object(jso, "hashAlg", &jso2)) { in ifapi_json_TPMS_SCHEME_ECDAA_deserialize()
2455 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->hashAlg); in ifapi_json_TPMS_SCHEME_ECDAA_deserialize()
2458 if (!ifapi_get_sub_object(jso, "count", &jso2)) { in ifapi_json_TPMS_SCHEME_ECDAA_deserialize()
2462 r = ifapi_json_UINT16_deserialize(jso2, &out->count); in ifapi_json_TPMS_SCHEME_ECDAA_deserialize()
2511 json_object *jso2; in ifapi_json_TPMS_SCHEME_XOR_deserialize() local
2516 if (!ifapi_get_sub_object(jso, "hashAlg", &jso2)) { in ifapi_json_TPMS_SCHEME_XOR_deserialize()
2520 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->hashAlg); in ifapi_json_TPMS_SCHEME_XOR_deserialize()
2523 if (!ifapi_get_sub_object(jso, "kdf", &jso2)) { in ifapi_json_TPMS_SCHEME_XOR_deserialize()
2527 r = ifapi_json_TPMI_ALG_KDF_deserialize(jso2, &out->kdf); in ifapi_json_TPMS_SCHEME_XOR_deserialize()
2577 json_object *jso2; in ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize() local
2582 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize()
2586 r = ifapi_json_TPMI_ALG_KEYEDHASH_SCHEME_deserialize(jso2, &out->scheme); in ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize()
2589 if (!ifapi_get_sub_object(jso, "details", &jso2)) { in ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize()
2593 r = ifapi_json_TPMU_SCHEME_KEYEDHASH_deserialize(out->scheme, jso2, in ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize()
2755 json_object *jso2; in ifapi_json_TPMT_SIG_SCHEME_deserialize() local
2760 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMT_SIG_SCHEME_deserialize()
2764 r = ifapi_json_TPMI_ALG_SIG_SCHEME_deserialize(jso2, &out->scheme); in ifapi_json_TPMT_SIG_SCHEME_deserialize()
2767 if (!ifapi_get_sub_object(jso, "details", &jso2)) { in ifapi_json_TPMT_SIG_SCHEME_deserialize()
2771 r = ifapi_json_TPMU_SIG_SCHEME_deserialize(out->scheme, jso2, &out->details); in ifapi_json_TPMT_SIG_SCHEME_deserialize()
2926 json_object *jso2; in ifapi_json_TPMT_KDF_SCHEME_deserialize() local
2931 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMT_KDF_SCHEME_deserialize()
2935 r = ifapi_json_TPMI_ALG_KDF_deserialize(jso2, &out->scheme); in ifapi_json_TPMT_KDF_SCHEME_deserialize()
2938 if (!ifapi_get_sub_object(jso, "details", &jso2)) { in ifapi_json_TPMT_KDF_SCHEME_deserialize()
2942 r = ifapi_json_TPMU_KDF_SCHEME_deserialize(out->scheme, jso2, &out->details); in ifapi_json_TPMT_KDF_SCHEME_deserialize()
3022 json_object *jso2; in ifapi_json_TPMT_RSA_SCHEME_deserialize() local
3027 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMT_RSA_SCHEME_deserialize()
3031 r = ifapi_json_TPMI_ALG_RSA_SCHEME_deserialize(jso2, &out->scheme); in ifapi_json_TPMT_RSA_SCHEME_deserialize()
3034 if (!ifapi_get_sub_object(jso, "details", &jso2)) { in ifapi_json_TPMT_RSA_SCHEME_deserialize()
3038 r = ifapi_json_TPMU_ASYM_SCHEME_deserialize(out->scheme, jso2, &out->details); in ifapi_json_TPMT_RSA_SCHEME_deserialize()
3073 json_object *jso2; in ifapi_json_TPMT_RSA_DECRYPT_deserialize() local
3078 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMT_RSA_DECRYPT_deserialize()
3082 r = ifapi_json_TPMI_ALG_RSA_DECRYPT_deserialize(jso2, &out->scheme); in ifapi_json_TPMT_RSA_DECRYPT_deserialize()
3085 if (!ifapi_get_sub_object(jso, "details", &jso2)) { in ifapi_json_TPMT_RSA_DECRYPT_deserialize()
3089 r = ifapi_json_TPMU_ASYM_SCHEME_deserialize(out->scheme, jso2, &out->details); in ifapi_json_TPMT_RSA_DECRYPT_deserialize()
3175 json_object *jso2; in ifapi_json_TPMS_ECC_POINT_deserialize() local
3180 if (!ifapi_get_sub_object(jso, "x", &jso2)) { in ifapi_json_TPMS_ECC_POINT_deserialize()
3184 r = ifapi_json_TPM2B_ECC_PARAMETER_deserialize(jso2, &out->x); in ifapi_json_TPMS_ECC_POINT_deserialize()
3187 if (!ifapi_get_sub_object(jso, "y", &jso2)) { in ifapi_json_TPMS_ECC_POINT_deserialize()
3191 r = ifapi_json_TPM2B_ECC_PARAMETER_deserialize(jso2, &out->y); in ifapi_json_TPMS_ECC_POINT_deserialize()
3238 json_object *jso2; in ifapi_json_TPMT_ECC_SCHEME_deserialize() local
3243 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMT_ECC_SCHEME_deserialize()
3247 r = ifapi_json_TPMI_ALG_ECC_SCHEME_deserialize(jso2, &out->scheme); in ifapi_json_TPMT_ECC_SCHEME_deserialize()
3250 if (!ifapi_get_sub_object(jso, "details", &jso2)) { in ifapi_json_TPMT_ECC_SCHEME_deserialize()
3254 r = ifapi_json_TPMU_ASYM_SCHEME_deserialize(out->scheme, jso2, &out->details); in ifapi_json_TPMT_ECC_SCHEME_deserialize()
3274 json_object *jso2; in ifapi_json_TPMS_SIGNATURE_RSA_deserialize() local
3279 if (!ifapi_get_sub_object(jso, "hash", &jso2)) { in ifapi_json_TPMS_SIGNATURE_RSA_deserialize()
3283 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->hash); in ifapi_json_TPMS_SIGNATURE_RSA_deserialize()
3286 if (!ifapi_get_sub_object(jso, "sig", &jso2)) { in ifapi_json_TPMS_SIGNATURE_RSA_deserialize()
3290 r = ifapi_json_TPM2B_PUBLIC_KEY_RSA_deserialize(jso2, &out->sig); in ifapi_json_TPMS_SIGNATURE_RSA_deserialize()
3342 json_object *jso2; in ifapi_json_TPMS_SIGNATURE_ECC_deserialize() local
3347 if (!ifapi_get_sub_object(jso, "hash", &jso2)) { in ifapi_json_TPMS_SIGNATURE_ECC_deserialize()
3351 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->hash); in ifapi_json_TPMS_SIGNATURE_ECC_deserialize()
3354 if (!ifapi_get_sub_object(jso, "signatureR", &jso2)) { in ifapi_json_TPMS_SIGNATURE_ECC_deserialize()
3358 r = ifapi_json_TPM2B_ECC_PARAMETER_deserialize(jso2, &out->signatureR); in ifapi_json_TPMS_SIGNATURE_ECC_deserialize()
3361 if (!ifapi_get_sub_object(jso, "signatureS", &jso2)) { in ifapi_json_TPMS_SIGNATURE_ECC_deserialize()
3365 r = ifapi_json_TPM2B_ECC_PARAMETER_deserialize(jso2, &out->signatureS); in ifapi_json_TPMS_SIGNATURE_ECC_deserialize()
3490 json_object *jso2; in ifapi_json_TPMT_SIGNATURE_deserialize() local
3495 if (!ifapi_get_sub_object(jso, "sigAlg", &jso2)) { in ifapi_json_TPMT_SIGNATURE_deserialize()
3499 r = ifapi_json_TPMI_ALG_SIG_SCHEME_deserialize(jso2, &out->sigAlg); in ifapi_json_TPMT_SIGNATURE_deserialize()
3502 if (!ifapi_get_sub_object(jso, "signature", &jso2)) { in ifapi_json_TPMT_SIGNATURE_deserialize()
3506 r = ifapi_json_TPMU_SIGNATURE_deserialize(out->sigAlg, jso2, &out->signature); in ifapi_json_TPMT_SIGNATURE_deserialize()
3599 json_object *jso2; in ifapi_json_TPMS_KEYEDHASH_PARMS_deserialize() local
3604 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMS_KEYEDHASH_PARMS_deserialize()
3608 r = ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize(jso2, &out->scheme); in ifapi_json_TPMS_KEYEDHASH_PARMS_deserialize()
3625 json_object *jso2; in ifapi_json_TPMS_RSA_PARMS_deserialize() local
3630 if (!ifapi_get_sub_object(jso, "symmetric", &jso2)) { in ifapi_json_TPMS_RSA_PARMS_deserialize()
3634 r = ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize(jso2, &out->symmetric); in ifapi_json_TPMS_RSA_PARMS_deserialize()
3637 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMS_RSA_PARMS_deserialize()
3641 r = ifapi_json_TPMT_RSA_SCHEME_deserialize(jso2, &out->scheme); in ifapi_json_TPMS_RSA_PARMS_deserialize()
3644 if (!ifapi_get_sub_object(jso, "keyBits", &jso2)) { in ifapi_json_TPMS_RSA_PARMS_deserialize()
3648 r = ifapi_json_TPMI_RSA_KEY_BITS_deserialize(jso2, &out->keyBits); in ifapi_json_TPMS_RSA_PARMS_deserialize()
3651 if (!ifapi_get_sub_object(jso, "exponent", &jso2)) { in ifapi_json_TPMS_RSA_PARMS_deserialize()
3655 r = ifapi_json_UINT32_deserialize(jso2, &out->exponent); in ifapi_json_TPMS_RSA_PARMS_deserialize()
3672 json_object *jso2; in ifapi_json_TPMS_ECC_PARMS_deserialize() local
3677 if (!ifapi_get_sub_object(jso, "symmetric", &jso2)) { in ifapi_json_TPMS_ECC_PARMS_deserialize()
3681 r = ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize(jso2, &out->symmetric); in ifapi_json_TPMS_ECC_PARMS_deserialize()
3684 if (!ifapi_get_sub_object(jso, "scheme", &jso2)) { in ifapi_json_TPMS_ECC_PARMS_deserialize()
3688 r = ifapi_json_TPMT_ECC_SCHEME_deserialize(jso2, &out->scheme); in ifapi_json_TPMS_ECC_PARMS_deserialize()
3691 if (!ifapi_get_sub_object(jso, "curveID", &jso2)) { in ifapi_json_TPMS_ECC_PARMS_deserialize()
3695 r = ifapi_json_TPMI_ECC_CURVE_deserialize(jso2, &out->curveID); in ifapi_json_TPMS_ECC_PARMS_deserialize()
3698 if (!ifapi_get_sub_object(jso, "kdf", &jso2)) { in ifapi_json_TPMS_ECC_PARMS_deserialize()
3702 r = ifapi_json_TPMT_KDF_SCHEME_deserialize(jso2, &out->kdf); in ifapi_json_TPMS_ECC_PARMS_deserialize()
3751 json_object *jso2; in ifapi_json_TPMT_PUBLIC_deserialize() local
3756 if (!ifapi_get_sub_object(jso, "type", &jso2)) { in ifapi_json_TPMT_PUBLIC_deserialize()
3760 r = ifapi_json_TPMI_ALG_PUBLIC_deserialize(jso2, &out->type); in ifapi_json_TPMT_PUBLIC_deserialize()
3763 if (!ifapi_get_sub_object(jso, "nameAlg", &jso2)) { in ifapi_json_TPMT_PUBLIC_deserialize()
3767 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->nameAlg); in ifapi_json_TPMT_PUBLIC_deserialize()
3770 if (!ifapi_get_sub_object(jso, "objectAttributes", &jso2)) { in ifapi_json_TPMT_PUBLIC_deserialize()
3774 r = ifapi_json_TPMA_OBJECT_deserialize(jso2, &out->objectAttributes); in ifapi_json_TPMT_PUBLIC_deserialize()
3777 if (!ifapi_get_sub_object(jso, "authPolicy", &jso2)) { in ifapi_json_TPMT_PUBLIC_deserialize()
3781 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->authPolicy); in ifapi_json_TPMT_PUBLIC_deserialize()
3783 if (!ifapi_get_sub_object(jso, "parameters", &jso2)) { in ifapi_json_TPMT_PUBLIC_deserialize()
3787 r = ifapi_json_TPMU_PUBLIC_PARMS_deserialize(out->type, jso2, &out->parameters); in ifapi_json_TPMT_PUBLIC_deserialize()
3790 if (!ifapi_get_sub_object(jso, "unique", &jso2)) { in ifapi_json_TPMT_PUBLIC_deserialize()
3794 r = ifapi_json_TPMU_PUBLIC_ID_deserialize(out->type, jso2, &out->unique); in ifapi_json_TPMT_PUBLIC_deserialize()
3811 json_object *jso2; in ifapi_json_TPM2B_PUBLIC_deserialize() local
3814 if (!ifapi_get_sub_object(jso, "size", &jso2)) { in ifapi_json_TPM2B_PUBLIC_deserialize()
3818 res = ifapi_json_UINT16_deserialize(jso2, &out->size); in ifapi_json_TPM2B_PUBLIC_deserialize()
3820 if (!ifapi_get_sub_object(jso, "publicArea", &jso2)) { in ifapi_json_TPM2B_PUBLIC_deserialize()
3824 res = ifapi_json_TPMT_PUBLIC_deserialize(jso2, &out->publicArea); in ifapi_json_TPM2B_PUBLIC_deserialize()
3943 json_object *jso2 = json_object_array_get_idx(jso, i); in ifapi_json_TPMA_NV_deserialize() local
3944 if (json_object_get_type(jso2) == json_type_object) { in ifapi_json_TPMA_NV_deserialize()
3945 if (!json_object_object_get_ex(jso2, "TPM2_NT", &jso2)) { in ifapi_json_TPMA_NV_deserialize()
3950 TSS2_RC r = ifapi_json_TPM2_NT_deserialize(jso2, &out2); in ifapi_json_TPMA_NV_deserialize()
3955 const char *token = strip_prefix(json_object_get_string(jso2), in ifapi_json_TPMA_NV_deserialize()
3969 LOG_ERROR("Unknown value: %s", json_object_get_string(jso2)); in ifapi_json_TPMA_NV_deserialize()
4028 json_object *jso2; in ifapi_json_TPMS_NV_PUBLIC_deserialize() local
4033 if (!ifapi_get_sub_object(jso, "nvIndex", &jso2)) { in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4037 r = ifapi_json_TPMI_RH_NV_INDEX_deserialize(jso2, &out->nvIndex); in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4040 if (!ifapi_get_sub_object(jso, "nameAlg", &jso2)) { in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4044 r = ifapi_json_TPMI_ALG_HASH_deserialize(jso2, &out->nameAlg); in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4047 if (!ifapi_get_sub_object(jso, "attributes", &jso2)) { in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4051 r = ifapi_json_TPMA_NV_deserialize(jso2, &out->attributes); in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4054 if (!ifapi_get_sub_object(jso, "authPolicy", &jso2)) { in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4058 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->authPolicy); in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4061 if (!ifapi_get_sub_object(jso, "dataSize", &jso2)) { in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4065 r = ifapi_json_UINT16_deserialize(jso2, &out->dataSize); in ifapi_json_TPMS_NV_PUBLIC_deserialize()
4082 json_object *jso2; in ifapi_json_TPM2B_NV_PUBLIC_deserialize() local
4085 if (!ifapi_get_sub_object(jso, "size", &jso2)) { in ifapi_json_TPM2B_NV_PUBLIC_deserialize()
4089 res = ifapi_json_UINT16_deserialize(jso2, &out->size); in ifapi_json_TPM2B_NV_PUBLIC_deserialize()
4091 if (!ifapi_get_sub_object(jso, "nvPublic", &jso2)) { in ifapi_json_TPM2B_NV_PUBLIC_deserialize()
4095 res = ifapi_json_TPMS_NV_PUBLIC_deserialize(jso2, &out->nvPublic); in ifapi_json_TPM2B_NV_PUBLIC_deserialize()
4112 json_object *jso2; in ifapi_json_TPMS_CREATION_DATA_deserialize() local
4117 if (!ifapi_get_sub_object(jso, "pcrSelect", &jso2)) { in ifapi_json_TPMS_CREATION_DATA_deserialize()
4121 r = ifapi_json_TPML_PCR_SELECTION_deserialize(jso2, &out->pcrSelect); in ifapi_json_TPMS_CREATION_DATA_deserialize()
4124 if (!ifapi_get_sub_object(jso, "pcrDigest", &jso2)) { in ifapi_json_TPMS_CREATION_DATA_deserialize()
4128 r = ifapi_json_TPM2B_DIGEST_deserialize(jso2, &out->pcrDigest); in ifapi_json_TPMS_CREATION_DATA_deserialize()
4131 if (!ifapi_get_sub_object(jso, "locality", &jso2)) { in ifapi_json_TPMS_CREATION_DATA_deserialize()
4135 r = ifapi_json_TPMA_LOCALITY_deserialize(jso2, &out->locality); in ifapi_json_TPMS_CREATION_DATA_deserialize()
4138 if (!ifapi_get_sub_object(jso, "parentNameAlg", &jso2)) { in ifapi_json_TPMS_CREATION_DATA_deserialize()
4142 r = ifapi_json_TPM2_ALG_ID_deserialize(jso2, &out->parentNameAlg); in ifapi_json_TPMS_CREATION_DATA_deserialize()
4145 if (!ifapi_get_sub_object(jso, "parentName", &jso2)) { in ifapi_json_TPMS_CREATION_DATA_deserialize()
4149 r = ifapi_json_TPM2B_NAME_deserialize(jso2, &out->parentName); in ifapi_json_TPMS_CREATION_DATA_deserialize()
4152 if (!ifapi_get_sub_object(jso, "parentQualifiedName", &jso2)) { in ifapi_json_TPMS_CREATION_DATA_deserialize()
4156 r = ifapi_json_TPM2B_NAME_deserialize(jso2, &out->parentQualifiedName); in ifapi_json_TPMS_CREATION_DATA_deserialize()
4159 if (!ifapi_get_sub_object(jso, "outsideInfo", &jso2)) { in ifapi_json_TPMS_CREATION_DATA_deserialize()
4163 r = ifapi_json_TPM2B_DATA_deserialize(jso2, &out->outsideInfo); in ifapi_json_TPMS_CREATION_DATA_deserialize()
4180 json_object *jso2; in ifapi_json_TPM2B_CREATION_DATA_deserialize() local
4183 if (!ifapi_get_sub_object(jso, "size", &jso2)) { in ifapi_json_TPM2B_CREATION_DATA_deserialize()
4187 res = ifapi_json_UINT16_deserialize(jso2, &out->size); in ifapi_json_TPM2B_CREATION_DATA_deserialize()
4189 if (!ifapi_get_sub_object(jso, "creationData", &jso2)) { in ifapi_json_TPM2B_CREATION_DATA_deserialize()
4193 res = ifapi_json_TPMS_CREATION_DATA_deserialize(jso2, &out->creationData); in ifapi_json_TPM2B_CREATION_DATA_deserialize()