Getting TbsCommandBlocked Exception when I run the microsoft/TSS.MSR Authorization sample on UWP

315 views Asked by At

The 'Authorization' sample of TSS.NET of TSS.MSR is running fine as console application, when I run the visual studio in admin mode. But when I use the same code in an UWP application by using Microsoft.TSS nuget, I am getting exception as {TbsCommandBlocked} i.e.,

"Error {TbsCommandBlocked} was returned for command CreatePrimary.\r\nDetails: \n[Code=TpmRc.TbsCommandBlocked], [RawCode=0x80280400,2150106112]\n[ErrorEntity=Unknown], [ParmNum=0]\n[ParmName=Unknown]" " at Tpm2Lib.Tpm2.ProcessError(TpmSt responseTag, UInt32 responseParamSize, TpmRc resultCode, TpmStructureBase inParms)\r\n at Tpm2Lib.Tpm2.DispatchMethod(TpmCc ordinal, TpmStructureBase inParms, Type expectedResponseType, TpmStructureBase& outParms, Int32 numInHandlesNotUsed, Int32 numOutHandlesNotUsed)\r\n at Tpm2Lib.Tpm2.CreatePrimary(TpmHandle primaryHandle, SensitiveCreate inSensitive, TpmPublic inPublic, Byte[] outsideInfo, PcrSelection[] creationPCR, TpmPublic& outPublic, CreationData& creationData, Byte[]& creationHash, TkCreation& creationTicket)\r\n at TPM_Hashing.MainPage.CreateRsaPrimaryKey(Tpm2 tpm) in C:\MainPage.xaml.cs:line 190\r\n at TPM_Hashing.MainPage.AutomaticAuth(Tpm2 tpm) in C:\MainPage.xaml.cs:line 280\r\n at TPM_Hashing.MainPage.mainMethod()

at the method:

TpmHandle h = tpm.CreatePrimary(TpmRh.None, sensCreate, parms, outsideInfo, new PcrSelection[] { creationPcr }, out pubCreated, out creationData, out creationHash, out creationTicket);

Other samples of the TSS.NET project like hashing, random number generation are working fine in UWP. This problem is observed only in higher level operations like Encryption/Decryption using TPM in UWP.

References:

  1. Discussion about same problem in TSS.MSR github page
0

There are 0 answers