policy¶
- class tpm2_pytss.policy(policy, hash_alg)[source]¶
Initialize policy object.
- Parameters:
- Returns:
An instance of the policy object.
This class implements the policy part of the TCG TSS 2.0 JSON Data Types and Policy Language Specification.
The specification can be found at https://trustedcomputinggroup.org/resource/tcg-tss-json/
- execute(esys_ctx, session)[source]¶
Executes the policy
- Parameters:
- Raises:
TSS2_Exception or any possible exception from a callback function. –
- get_calculated_digest()[source]¶
Get the digest of the calculated policy
- Returns:
The digest as a TPM2B_DIGEST.
- Raises:
- get_calculated_json()[source]¶
Get the calculated policy as JSON
- Returns:
The calculated JSON policy as bytes
- Raises: