예제 #1
0
        void TestVendorSpecific(Tpm2 tpm, TestContext testCtx)
        {
            if (!TpmCfg.IsImplemented(TpmCc.VendorTcgTest))
            {
                Substrate.WriteToLog("TestVendorSpecific skipped", ConsoleColor.DarkCyan);
                return;
            }

            TpmHandle h = Substrate.CreateDataObject(tpm);

            byte[] inData = Substrate.RandomBytes(24);

            testCtx.ReportParams("Input data size: " + inData.Length);
            byte[] outData = tpm.VendorTcgTest(inData);
            testCtx.Assert("CertDataReceived", outData.Length > 0, outData.Length);

            tpm.FlushContext(h);
        } // TestVendorSpecific