📄 tsp.idl
字号:
/*++
+++TSP.idl
Interface declarations for the TSS Service Provider
- COM interface for Windows based platforms
--*/
import "oaidl.idl"; // include ODL base types
import "ocidl.idl";
//import the header files from TSS v1.2
import "tss_typedef.h";
import "tss_structs.h";
// forward declaration
interface ITCPAPolicy;
interface ITCPAKey;
/*
Missing:
TSS_RESULT Tspi_Context_Create
TSS_RESULT Tspi_Context_Close
TSS_RESULT Tspi_Context_FreeMemory
*/
//ITCPAAttrib Interface
[
local,
object,
uuid(FBCD9C2E-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAAttrib Interface"),
pointer_default(unique)
]
interface ITCPAAttrib : IUnknown
{
[helpstring("method SetAttribUint32")]
HRESULT SetAttribUint32([in] TSS_FLAG attribFlag,
[in] TSS_FLAG subFlags,
[in] UINT32 ulAttrib);
[helpstring("method GetAttribUint32")]
HRESULT GetAttribUint32([in] TSS_FLAG attribFlag,
[in] TSS_FLAG subFlags,
[out] UINT32* pulAttrib);
[helpstring("method SetAttribData")]
HRESULT SetAttribData([in] TSS_FLAG attribFlag,
[in] TSS_FLAG subFlags,
[in] UINT32 ulAttribDataSize,
[in, ptr, size_is(ulAttribDataSize)] BYTE* pbAttribData);
[helpstring("method GetAttribData")]
HRESULT GetAttribData([in] TSS_FLAG attribFlag,
[in] TSS_FLAG subFlags,
[out] UINT32* pulAttribDataSize,
[out, size_is(, *pulAttribDataSize)] BYTE** ppbAttribData);
}
//ITCPAAuth Interface
[
local,
object,
uuid(FBCD9C2F-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAAuth Interface"),
pointer_default(unique)
]
interface ITCPAAuth : IUnknown
{
[helpstring("method GetPolicyObject")]
HRESULT GetPolicyObject([in] TSS_FLAG PolicyType,
[out] ITCPAPolicy** ppPolicyObject);
[helpstring("method ChangeAuth")]
HRESULT ChangeAuth([in] IUnknown* PpParentObject,
[in] ITCPAPolicy* PpNewPolicy);
// HRESULT ChangeAuthAsym
};
[
object,
uuid(FBCD9C2D-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAPcrs Interface"),
pointer_default(unique)
]
interface ITCPAPcrs : IUnknown
{
[helpstring("method SetPcrValue")]
HRESULT SetPcrValue([in] UINT32 ulPCRIndex,
[in] UINT32 ulPcrValueLength,
[in, size_is(ulPcrValueLength)] BYTE* pbPcrValue);
[helpstring("method GetPcrValue")]
HRESULT GetPcrValue([in] UINT32 ulPCRIndex,
[out] UINT32* pulPcrValueLength,
[out, size_is(, *pulPcrValueLength)] BYTE** ppbPcrValue);
[helpstring("method SelectPcrIndex")]
HRESULT SelectPcrIndex([in] UINT32 ulPCRIndex);
};
//ITCPAKey Interface
[
object,
uuid(FBCD9C27-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAKey Interface"),
pointer_default(unique)
]
interface ITCPAKey : IUnknown
{
[helpstring("method LoadKey")]
HRESULT LoadKey([in] ITCPAKey* pUnwrappingKey);
[helpstring("method CreateKey")]
HRESULT CreateKey([in] ITCPAKey* pUnwrappingKey,
[in] ITCPAPcrs* pPcrComosite);
[helpstring("method WrapKey")]
HRESULT WrapKey([in] ITCPAKey* pWrappinKey,
[in] ITCPAPcrs* pPcrComposite);
[helpstring("method CertifyKey")]
HRESULT CertifyKey([in] ITCPAKey* pCertifyingKey,
[in, out, ptr] TSS_VALIDATION* pValidation);
[helpstring("method GetPubKey")]
HRESULT GetPubKey([out] UINT32* pulPubKeyLength,
[out, size_is(, *pulPubKeyLength)] BYTE** ppbPubKey);
[helpstring("method UnLoadKey")]
HRESULT UnLoadKey();
};
// ITCPAMigration
[
local,
object,
uuid(FBCD9C30-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAMigration Interface"),
pointer_default(unique)
]
interface ITCPAMigration : IUnknown
{
[helpstring("method CreateMigrationBlob")]
HRESULT CreateMigrationBlob([in] ITCPAKey *pParentKey,
[in] UINT32 ulMigTicketLength,
[in, size_is(ulMigTicketLength)] BYTE* rgbMigTicket,
[out] UINT32 *pulRandomLength,
[out, size_is(, *pulRandomLength)] BYTE **prgbRandom,
[out] UINT32 *pulMigrationBlobLength,
[out, size_is(, *pulMigrationBlobLength)] BYTE **prgbMigBlob);
[helpstring("method ConvertMigrationBlob")]
HRESULT ConvertMigrationBlob([in] ITCPAKey *pParentKey,
[in] UINT32 ulRandomLength,
[in, size_is(ulRandomLength)] BYTE *rgbRandom,
[in] UINT32 ulMigrationBlobLength,
[in, size_is(ulMigrationBlobLength)] BYTE *rgbMigBlob);
};
//ITCPAEncData Interface
[
uuid(FBCD9C29-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAEncData Interface"),
pointer_default(unique)
]
interface ITCPAEncData : IUnknown
{
[helpstring("method Seal")]
HRESULT Seal([in] ITCPAKey* pEncKey,
[in] UINT32 ulDataLength,
[in, size_is(ulDataLength)] BYTE* pbData,
[in] ITCPAPcrs* pPcrComposite);
[helpstring("method Unseal")]
HRESULT Unseal([in] ITCPAKey* pKey,
[out] UINT32* pulUnsealedDataLength,
[out, size_is(, *pulUnsealedDataLength)] BYTE** ppbData);
[helpstring("method Bind")]
HRESULT Bind([in] ITCPAKey* pEncKey,
[in] UINT32 ulDataLength,
[in, size_is(ulDataLength)] BYTE* pbData);
[helpstring("method Unbind")]
HRESULT Unbind([in] ITCPAKey* pKey,
[out] UINT32* pulUnboundDataLength,
[out, size_is(, *pulUnboundDataLength)] BYTE** ppbData);
};
//ITCPAHash Interface
[
local,
object,
uuid(FBCD9C2B-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAHash Interface"),
pointer_default(unique)
]
interface ITCPAHash : IUnknown
{
[helpstring("method SetHashValue")]
HRESULT SetHashValue([in] UINT32 ulHashValueLength,
[in, size_is(ulHashValueLength)] BYTE* pbHash);
[helpstring("method GetHashValue")]
HRESULT GetHashValue([out] UINT32* pulHashValueLength,
[out, size_is(, *pulHashValueLength)] BYTE** ppbHash);
[helpstring("method UpdateHashValue")]
HRESULT UpdateHashValue([in] UINT32 ulDataLength,
[in, size_is(ulDataLength)] BYTE* pbData);
[helpstring("method Sign")]
HRESULT Sign([in] ITCPAKey* pKey,
[out] UINT32* pulSignatureLength,
[out, size_is(, *pulSignatureLength)] BYTE** ppbSignature);
[helpstring("method VerifySignature")]
HRESULT VerifySignature([in] ITCPAKey* pKey,
[in] UINT32 ulSignatureLength,
[in, size_is(ulSignatureLength)] BYTE* pbSignature);
};
//ITCPAPolicy Interface
[
uuid(FBCD9C1E-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAPolicy Interface"),
pointer_default(unique)
]
interface ITCPAPolicy : IUnknown
{
[helpstring("method SetSecret")]
HRESULT SetSecret([in] TSS_FLAG SecretMode,
[in] UINT32 ulSecretLength,
[in, ptr, size_is(ulSecretLength)] BYTE* pbSecret);
[helpstring("method FlushSecret")]
HRESULT FlushSecret();
[helpstring("method AssignToObject")]
HRESULT AssignToObject([in] IUnknown* pUnkObject);
};
//ITCPAAdministration Interface
[
local,
object,
uuid(FBCD9C24-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAAdministration Interface"),
pointer_default(unique)
]
interface ITCPAAdministration : IUnknown
{
[helpstring("method SelfTestFull")]
HRESULT SelfTestFull();
[helpstring("method GetTestResult")]
HRESULT GetTestResult([out] UINT32* pulTestResultLength,
[out, size_is(, *pulTestResultLength)] BYTE** ppbTestResult);
[helpstring("method CertifySelfTest")]
HRESULT CertifySelfTest([in] ITCPAKey* phKey,
[in, out, ptr] TSS_VALIDATION* pValidationData);
[helpstring("method CreateEndorsementKey")]
HRESULT CreateEndorsementKey([in] ITCPAKey* pEndorsementKey,
[in, out, ptr] TSS_VALIDATION* pValidation);
[helpstring("method GetPubEndorsementKey")]
HRESULT GetPubEndorsementKey([in] BOOL fOwnerAuthorized,
[in, out, ptr] TSS_VALIDATION* pValidation,
[out] ITCPAKey** ppEndorsementKey);
[helpstring("method TakeOwnerShip")]
HRESULT TakeOwnerShip([in] ITCPAKey* pKeySRK,
[in] ITCPAKey* pEndorsementKeyPubKey);
[helpstring("method ClearOwner")]
HRESULT ClearOwner([in] BOOL fForcedClear);
[helpstring("method SetStatus")]
HRESULT SetStatus([in] TSS_FLAG statusFlag,
[in] BOOL fTpmState);
[helpstring("method GetStatus")]
HRESULT GetStatus([in] TSS_FLAG statusFlag,
[out] BOOL* pfTpmState);
[helpstring("method AuthorizeMigrationTicket")]
HRESULT AuthorizeMigrationTicket([in] ITCPAKey* pMigrationKey,
[in] UINT32 MigrationScheme,
[out] UINT32* pulMigTicketLength,
[out, size_is(, *pulMigTicketLength)] BYTE** ppbMigTicket);
}
//ITCPAIntegrity Interface
[
local,
object,
uuid(FBCD9C22-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAIntegrity Interface"),
pointer_default(unique)
]
interface ITCPAIntegrity : IUnknown
{
[helpstring("method PcrExtend")]
HRESULT PcrExtend([in] UINT32 ulPcrIndex,
[in] UINT32 ulPcrDataLength,
[in, size_is(ulPcrDataLength)] BYTE* pbPcrData,
[in, ptr] TSS_PCR_EVENT* pEventInfo,
[out] UINT32* pulPcrValueLength,
[out, size_is(, *pulPcrValueLength)] BYTE** ppbPcrValue);
[helpstring("method PcrRead")]
HRESULT PcrRead([in] UINT32 ulPcrIndex,
[out] UINT32* pulPcrValueLength,
[out, size_is(, *pulPcrValueLength)] BYTE** ppbPcrValue);
[helpstring("method DirWrite")]
HRESULT DirWrite([in] UINT32 ulDirIndex,
[in] UINT32 ulDirDataLength,
[in, size_is(ulDirDataLength)] BYTE* pbDirData);
[helpstring("method DirRead")]
HRESULT DirRead([in] UINT32 ulDirIndex,
[out] UINT32* pulDirDataLength,
[out, size_is(, *pulDirDataLength)] BYTE** pbDirData);
[helpstring("method Quote")]
HRESULT Quote([in] ITCPAKey* pIdentKey,
[in] ITCPAPcrs* pPcrComposite,
[in, out, ptr] TSS_VALIDATION* pValidation);
};
//ITCPAIdentityCreation Interface
[
object,
uuid(FBCD9C23-72CB-47BB-99DD-2317551491DE),
helpstring("ITCPAIdentityCreation Interface"),
pointer_default(unique)
]
interface ITCPAIdentityCreation: IUnknown
{
[helpstring("method CollateIdentityRequest")]
HRESULT CollateIdentityRequest([in] ITCPAKey* pKeySRK,
[in] ITCPAKey* pCAPubKey,
[in] UINT32 ulIdentityLabelLength,
[in, size_is(ulIdentityLabelLength)] BYTE* rgbIdentityLabelData,
[in] ITCPAKey* pIdentityKey,
[in] TSS_ALGORITHM_ID algID,
[out] UINT32* pulTCPAIdentityReqLength,
[out, size_is(, *pulTCPAIdentityReqLength)] BYTE** prgbTCPAIdentityReq);
[helpstring("method ActivateIdentity")]
HRESULT ActivateIdentity([in] ITCPAKey* pIdentityKey,
[in] UINT32 ulAsymCAContentsBlobLength,
[in, size_is(ulAsymCAContentsBlobLength)] BYTE* rgbAsymCAContentsBlob,
[in] UINT32 ulSymCAAttestationBlobLength,
[in, size_is(ulSymCAAttestationBlobLength)] BYTE* rgbSymCAAttestationBlob,
[out] UINT32* pulCredentialLength,
[out, size_is(, *pulCredentialLength)] BYTE** prgbCredential);
}; // end of ITCPAIdentityCreation
//ITCPAMaintenance Interface
[
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -