Méthode | Description | |
---|---|---|
PolicySecretCallback ( |
This callback function provides authorization in plain text
|
|
PolicySecretCallback2 ( |
This callback function provides authorization in the form of an HMAC session
|
|
SignerCallback ( |
The callback to sign the TpmPolicySignature challenge from the TPM.
|
Méthode | Description | |
---|---|---|
CreateSealedPrimaryObject ( |
Create a sealed-object primary that can be accessed with the given policy. SHA256 is assumed.
|
|
Main ( string args ) : void |
This sample demonstrates the creation of a signing "primary" key and use of this key to sign data, and use of the TPM and Tpm2Lib to validate the signature.
|
|
ParseArguments ( IEnumerable |
Parse the arguments of the program and return the selected values.
|
|
PolicyEvaluationWithCallback ( |
Some policies can be evaluated solely from public parts of the policy. Others need a private keyholder to sign some data. Tpm2Lib provides a callback facility for these cases. In this sample the callback signs some data using a software key. But the callback might also ask for a smartcard to sign a challenge, etc.
|
|
PolicyEvaluationWithCallback2 ( |
Some policies can be evaluated solely from public parts of the policy. Others needs a private keyholder to sign some data. Tpm2Lib provides a callback facility for these cases. This second sample illustrates the use of callbacks to provide authData.
|
|
PolicyOr ( |
This sample illustrates the use of a TpmPolicyOr.
|
|
PolicySerialization ( ) : void |
This sample demonstrates how policies can be created in a standard form and then shared between hosts.
|
|
SamplePolicySerializationAndCallbacks ( |
This sample demonstrates a policy containing ALL policy commands. It also demonstrates serialization of the policy, and the use of callbacks to satisfy the conditions in a policy (e.g. knowledge of a private key, or the NV-index associated with a name.
|
|
SimplePolicy ( |
This sample illustrates the use of a simple TPM policy session. The policy demands PCR 1, 2, 3 set to current values, and the command be issued at locality zero.
|
|
WriteUsage ( ) : void |
Prints instructions for usage of this program.
|
static public PolicySecretCallback ( |
||
policyTree | ||
ace | ||
authorizingSession | ||
authorizedEntityHandle | ||
flushAuthEntity | bool | |
Résultat | void |
static public PolicySecretCallback2 ( |
||
policyTree | ||
ace | ||
authorizingSession | ||
authorizedEntityHandle | ||
flushAuthEntity | bool | |
Résultat | void |
public static SignerCallback ( |
||
policyTree | The policy tree to check. | |
ace | The policy element (TpmPolicySignature) to evaluate. | |
nonceTpm | byte | The nonce from the TPM. |
verificationKey | ||
Résultat | ISignatureUnion |