Skip to content
Discussion options

You must be logged in to vote

Ah, found something in a subsequent search that sorted out my issue:

ICapabilitiesUnion caps;
tpm.GetCapability(Cap.Handles, 0x81000000, 32, out caps);
var handles = (HandleArray)caps;
var tpmHandles = handles.handle;

Console.WriteLine($"Found the following handles:");
int index = 0;
foreach (var handle in tpmHandles)
{
    var handleValue = handle.handle.ToString("X");
    var handleType = handle.GetType().ToString();
    Console.WriteLine($"{index++}: {handleValue} type:{handleType}");
}

That creates the following output, which is what I was looking for:

Checking for TPM2 Persistent Handles
Found the following handles:
0: 81000001 type:Persistent
1: 81000002 type:Persistent
2: 8100000…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GuyWithDogs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant