When TSS.Net is built for AOT there are a few warnings (after setting <TrimmerSingleWarn>false</TrimmerSingleWarn>) and, for example, the Tpm2StartupRequest command on the wire is invalid - it is missing the startupType field:
80 01 00 00 00 0A 00 00 01 44
When built to CLR, the field is present:
80 01 00 00 00 0C 00 00 01 44 00 00
minimal repro (with MS TPM Simulator on 127.0.0.1:2321):
using System;
using Tpm2Lib;
namespace TpmTest
{
internal class Program
{
static void Main(string[] args)
{
var tpmDevice = new TcpTpmDevice("127.0.0.1", 2321);
tpmDevice.Connect();
var tpm = new Tpm2(tpmDevice);
Console.WriteLine("Power cycle TPM");
tpmDevice.PowerCycle();
Console.WriteLine("TPM powered up");
tpm.Startup(Su.Clear); // works in CLR, fails in AOT
Console.WriteLine("TPM started up");
}
}
}
When TSS.Net is built for AOT there are a few warnings (after setting
<TrimmerSingleWarn>false</TrimmerSingleWarn>
) and, for example, theTpm2StartupRequest
command on the wire is invalid - it is missing thestartupType
field:80 01 00 00 00 0A 00 00 01 44
When built to CLR, the field is present:
80 01 00 00 00 0C 00 00 01 44 00 00
minimal repro (with MS TPM Simulator on 127.0.0.1:2321):