xref: /netbsd-src/crypto/external/cpl/trousers/dist/src/include/tss/TSP.idl (revision 1023804e3833a0bd94414f2545512128f6502c74)
1/*++
2
3+++TSP.idl
4
5    Interface declarations for the TSS Service Provider
6    - COM interface for Windows based platforms
7
8--*/
9import "oaidl.idl";		// include ODL base types
10import "ocidl.idl";
11
12//import the header files from TSS v1.2
13import "tss_typedef.h";
14import "tss_structs.h";
15
16// forward declaration
17interface ITCPAPolicy;
18interface ITCPAKey;
19
20/*
21Missing:
22TSS_RESULT Tspi_Context_Create
23TSS_RESULT Tspi_Context_Close
24TSS_RESULT Tspi_Context_FreeMemory
25*/
26
27    //ITCPAAttrib Interface
28    [
29        local,
30        object,
31        uuid(FBCD9C2E-72CB-47BB-99DD-2317551491DE),
32
33        helpstring("ITCPAAttrib Interface"),
34        pointer_default(unique)
35    ]
36    interface ITCPAAttrib : IUnknown
37    {
38        [helpstring("method SetAttribUint32")]
39        HRESULT SetAttribUint32([in] TSS_FLAG attribFlag,
40                                [in] TSS_FLAG subFlags,
41                                [in] UINT32 ulAttrib);
42
43        [helpstring("method GetAttribUint32")]
44        HRESULT GetAttribUint32([in] TSS_FLAG attribFlag,
45                                [in] TSS_FLAG subFlags,
46                                [out] UINT32* pulAttrib);
47
48        [helpstring("method SetAttribData")]
49        HRESULT SetAttribData([in] TSS_FLAG attribFlag,
50                              [in] TSS_FLAG subFlags,
51                              [in] UINT32 ulAttribDataSize,
52                              [in, ptr, size_is(ulAttribDataSize)] BYTE* pbAttribData);
53
54        [helpstring("method GetAttribData")]
55        HRESULT GetAttribData([in] TSS_FLAG attribFlag,
56                              [in] TSS_FLAG subFlags,
57                              [out] UINT32* pulAttribDataSize,
58                              [out, size_is(, *pulAttribDataSize)] BYTE** ppbAttribData);
59    }
60
61    //ITCPAAuth Interface
62    [
63        local,
64        object,
65        uuid(FBCD9C2F-72CB-47BB-99DD-2317551491DE),
66
67        helpstring("ITCPAAuth Interface"),
68        pointer_default(unique)
69    ]
70    interface ITCPAAuth : IUnknown
71    {
72        [helpstring("method GetPolicyObject")]
73        HRESULT GetPolicyObject([in] TSS_FLAG PolicyType,
74                                [out] ITCPAPolicy** ppPolicyObject);
75
76        [helpstring("method ChangeAuth")]
77        HRESULT ChangeAuth([in] IUnknown* PpParentObject,
78                           [in] ITCPAPolicy* PpNewPolicy);
79
80// HRESULT ChangeAuthAsym
81
82    };
83
84    [
85        object,
86        uuid(FBCD9C2D-72CB-47BB-99DD-2317551491DE),
87        helpstring("ITCPAPcrs Interface"),
88        pointer_default(unique)
89    ]
90    interface ITCPAPcrs : IUnknown
91    {
92        [helpstring("method SetPcrValue")]
93        HRESULT SetPcrValue([in] UINT32 ulPCRIndex,
94                            [in] UINT32 ulPcrValueLength,
95                            [in, size_is(ulPcrValueLength)] BYTE* pbPcrValue);
96
97        [helpstring("method GetPcrValue")]
98        HRESULT GetPcrValue([in] UINT32 ulPCRIndex,
99                            [out] UINT32* pulPcrValueLength,
100                            [out, size_is(, *pulPcrValueLength)] BYTE** ppbPcrValue);
101
102        [helpstring("method SelectPcrIndex")]
103        HRESULT SelectPcrIndex([in] UINT32 ulPCRIndex);
104
105    };
106
107    //ITCPAKey Interface
108    [
109        object,
110        uuid(FBCD9C27-72CB-47BB-99DD-2317551491DE),
111
112        helpstring("ITCPAKey Interface"),
113        pointer_default(unique)
114    ]
115    interface ITCPAKey : IUnknown
116    {
117        [helpstring("method LoadKey")]
118        HRESULT LoadKey([in] ITCPAKey* pUnwrappingKey);
119
120        [helpstring("method CreateKey")]
121        HRESULT CreateKey([in] ITCPAKey* pUnwrappingKey,
122                          [in] ITCPAPcrs* pPcrComosite);
123
124        [helpstring("method WrapKey")]
125        HRESULT WrapKey([in] ITCPAKey* pWrappinKey,
126                        [in] ITCPAPcrs* pPcrComposite);
127
128        [helpstring("method CertifyKey")]
129        HRESULT CertifyKey([in] ITCPAKey* pCertifyingKey,
130                           [in, out, ptr] TSS_VALIDATION* pValidation);
131
132        [helpstring("method GetPubKey")]
133        HRESULT GetPubKey([out] UINT32* pulPubKeyLength,
134                          [out, size_is(, *pulPubKeyLength)] BYTE** ppbPubKey);
135
136        [helpstring("method UnLoadKey")]
137        HRESULT UnLoadKey();
138    };
139
140    // ITCPAMigration
141    [
142        local,
143        object,
144        uuid(FBCD9C30-72CB-47BB-99DD-2317551491DE),
145
146        helpstring("ITCPAMigration Interface"),
147        pointer_default(unique)
148    ]
149    interface ITCPAMigration : IUnknown
150    {
151        [helpstring("method CreateMigrationBlob")]
152        HRESULT CreateMigrationBlob([in] ITCPAKey *pParentKey,
153                                    [in] UINT32 ulMigTicketLength,
154                                    [in, size_is(ulMigTicketLength)] BYTE* rgbMigTicket,
155                                    [out] UINT32 *pulRandomLength,
156                                    [out, size_is(, *pulRandomLength)] BYTE **prgbRandom,
157                                    [out] UINT32 *pulMigrationBlobLength,
158                                    [out, size_is(, *pulMigrationBlobLength)] BYTE **prgbMigBlob);
159
160        [helpstring("method ConvertMigrationBlob")]
161        HRESULT ConvertMigrationBlob([in] ITCPAKey *pParentKey,
162                                     [in] UINT32 ulRandomLength,
163                                     [in, size_is(ulRandomLength)] BYTE *rgbRandom,
164                                     [in] UINT32 ulMigrationBlobLength,
165                                     [in, size_is(ulMigrationBlobLength)] BYTE *rgbMigBlob);
166    };
167
168    //ITCPAEncData Interface
169    [
170        uuid(FBCD9C29-72CB-47BB-99DD-2317551491DE),
171
172        helpstring("ITCPAEncData Interface"),
173        pointer_default(unique)
174    ]
175    interface ITCPAEncData : IUnknown
176    {
177        [helpstring("method Seal")]
178        HRESULT Seal([in] ITCPAKey* pEncKey,
179                     [in] UINT32 ulDataLength,
180                     [in, size_is(ulDataLength)] BYTE* pbData,
181                     [in] ITCPAPcrs* pPcrComposite);
182
183        [helpstring("method Unseal")]
184        HRESULT Unseal([in] ITCPAKey* pKey,
185                       [out] UINT32* pulUnsealedDataLength,
186                       [out, size_is(, *pulUnsealedDataLength)] BYTE** ppbData);
187
188        [helpstring("method Bind")]
189        HRESULT Bind([in] ITCPAKey* pEncKey,
190                     [in] UINT32 ulDataLength,
191                     [in, size_is(ulDataLength)] BYTE* pbData);
192
193        [helpstring("method Unbind")]
194        HRESULT Unbind([in] ITCPAKey* pKey,
195                       [out] UINT32* pulUnboundDataLength,
196                       [out, size_is(, *pulUnboundDataLength)] BYTE** ppbData);
197
198    };
199
200    //ITCPAHash Interface
201    [
202        local,
203        object,
204        uuid(FBCD9C2B-72CB-47BB-99DD-2317551491DE),
205
206        helpstring("ITCPAHash Interface"),
207        pointer_default(unique)
208    ]
209    interface ITCPAHash : IUnknown
210    {
211        [helpstring("method SetHashValue")]
212        HRESULT SetHashValue([in] UINT32 ulHashValueLength,
213                             [in, size_is(ulHashValueLength)] BYTE* pbHash);
214
215        [helpstring("method GetHashValue")]
216        HRESULT GetHashValue([out] UINT32* pulHashValueLength,
217                             [out, size_is(, *pulHashValueLength)] BYTE** ppbHash);
218
219        [helpstring("method UpdateHashValue")]
220        HRESULT UpdateHashValue([in] UINT32 ulDataLength,
221                                [in, size_is(ulDataLength)] BYTE* pbData);
222
223        [helpstring("method Sign")]
224        HRESULT Sign([in] ITCPAKey* pKey,
225                     [out] UINT32* pulSignatureLength,
226                     [out, size_is(, *pulSignatureLength)] BYTE** ppbSignature);
227
228        [helpstring("method VerifySignature")]
229        HRESULT VerifySignature([in] ITCPAKey* pKey,
230                                [in] UINT32 ulSignatureLength,
231                                [in, size_is(ulSignatureLength)] BYTE* pbSignature);
232
233    };
234
235    //ITCPAPolicy Interface
236    [
237        uuid(FBCD9C1E-72CB-47BB-99DD-2317551491DE),
238
239        helpstring("ITCPAPolicy Interface"),
240        pointer_default(unique)
241    ]
242    interface ITCPAPolicy : IUnknown
243    {
244        [helpstring("method SetSecret")]
245        HRESULT SetSecret([in] TSS_FLAG SecretMode,
246                          [in] UINT32 ulSecretLength,
247                          [in, ptr, size_is(ulSecretLength)] BYTE* pbSecret);
248
249        [helpstring("method FlushSecret")]
250        HRESULT FlushSecret();
251
252        [helpstring("method AssignToObject")]
253        HRESULT AssignToObject([in] IUnknown* pUnkObject);
254
255    };
256
257    //ITCPAAdministration Interface
258    [
259        local,
260        object,
261        uuid(FBCD9C24-72CB-47BB-99DD-2317551491DE),
262
263        helpstring("ITCPAAdministration Interface"),
264        pointer_default(unique)
265    ]
266    interface ITCPAAdministration : IUnknown
267    {
268        [helpstring("method SelfTestFull")]
269        HRESULT SelfTestFull();
270
271        [helpstring("method GetTestResult")]
272        HRESULT GetTestResult([out] UINT32* pulTestResultLength,
273                              [out, size_is(, *pulTestResultLength)] BYTE** ppbTestResult);
274
275        [helpstring("method CertifySelfTest")]
276        HRESULT CertifySelfTest([in] ITCPAKey* phKey,
277                                [in, out, ptr] TSS_VALIDATION* pValidationData);
278
279        [helpstring("method CreateEndorsementKey")]
280        HRESULT CreateEndorsementKey([in] ITCPAKey* pEndorsementKey,
281                                     [in, out, ptr] TSS_VALIDATION* pValidation);
282
283        [helpstring("method GetPubEndorsementKey")]
284        HRESULT GetPubEndorsementKey([in] BOOL fOwnerAuthorized,
285                                     [in, out, ptr] TSS_VALIDATION* pValidation,
286                                     [out] ITCPAKey** ppEndorsementKey);
287
288        [helpstring("method TakeOwnerShip")]
289        HRESULT TakeOwnerShip([in] ITCPAKey* pKeySRK,
290                              [in] ITCPAKey* pEndorsementKeyPubKey);
291
292        [helpstring("method ClearOwner")]
293        HRESULT ClearOwner([in] BOOL fForcedClear);
294
295        [helpstring("method SetStatus")]
296        HRESULT SetStatus([in] TSS_FLAG statusFlag,
297                          [in] BOOL fTpmState);
298
299        [helpstring("method GetStatus")]
300        HRESULT GetStatus([in] TSS_FLAG statusFlag,
301                          [out] BOOL* pfTpmState);
302
303        [helpstring("method AuthorizeMigrationTicket")]
304        HRESULT AuthorizeMigrationTicket([in] ITCPAKey* pMigrationKey,
305                                         [in] UINT32 MigrationScheme,
306                                         [out] UINT32* pulMigTicketLength,
307                                         [out, size_is(, *pulMigTicketLength)] BYTE** ppbMigTicket);
308    }
309
310    //ITCPAIntegrity Interface
311    [
312        local,
313        object,
314        uuid(FBCD9C22-72CB-47BB-99DD-2317551491DE),
315
316        helpstring("ITCPAIntegrity Interface"),
317        pointer_default(unique)
318    ]
319    interface ITCPAIntegrity : IUnknown
320    {
321        [helpstring("method PcrExtend")]
322        HRESULT PcrExtend([in] UINT32 ulPcrIndex,
323                          [in] UINT32 ulPcrDataLength,
324                          [in, size_is(ulPcrDataLength)] BYTE* pbPcrData,
325                          [in, ptr] TSS_PCR_EVENT* pEventInfo,
326                          [out] UINT32* pulPcrValueLength,
327                          [out, size_is(, *pulPcrValueLength)] BYTE** ppbPcrValue);
328
329        [helpstring("method PcrRead")]
330        HRESULT PcrRead([in] UINT32 ulPcrIndex,
331                        [out] UINT32* pulPcrValueLength,
332                        [out, size_is(, *pulPcrValueLength)] BYTE** ppbPcrValue);
333
334        [helpstring("method DirWrite")]
335        HRESULT DirWrite([in] UINT32 ulDirIndex,
336                         [in] UINT32 ulDirDataLength,
337                         [in, size_is(ulDirDataLength)] BYTE* pbDirData);
338
339        [helpstring("method DirRead")]
340        HRESULT DirRead([in] UINT32 ulDirIndex,
341                        [out] UINT32* pulDirDataLength,
342                        [out, size_is(, *pulDirDataLength)] BYTE** pbDirData);
343
344        [helpstring("method Quote")]
345        HRESULT Quote([in] ITCPAKey* pIdentKey,
346                      [in] ITCPAPcrs* pPcrComposite,
347                      [in, out, ptr] TSS_VALIDATION* pValidation);
348    };
349
350    //ITCPAIdentityCreation Interface
351    [
352      object,
353      uuid(FBCD9C23-72CB-47BB-99DD-2317551491DE),
354
355      helpstring("ITCPAIdentityCreation Interface"),
356      pointer_default(unique)
357    ]
358    interface ITCPAIdentityCreation: IUnknown
359    {
360        [helpstring("method CollateIdentityRequest")]
361        HRESULT CollateIdentityRequest([in] ITCPAKey* pKeySRK,
362                                       [in] ITCPAKey* pCAPubKey,
363                                       [in] UINT32 ulIdentityLabelLength,
364                                       [in, size_is(ulIdentityLabelLength)] BYTE* rgbIdentityLabelData,
365                                       [in] ITCPAKey* pIdentityKey,
366                                       [in] TSS_ALGORITHM_ID algID,
367                                       [out] UINT32* pulTCPAIdentityReqLength,
368                                       [out, size_is(, *pulTCPAIdentityReqLength)] BYTE** prgbTCPAIdentityReq);
369
370        [helpstring("method ActivateIdentity")]
371        HRESULT ActivateIdentity([in] ITCPAKey* pIdentityKey,
372                                 [in] UINT32 ulAsymCAContentsBlobLength,
373                                 [in, size_is(ulAsymCAContentsBlobLength)] BYTE* rgbAsymCAContentsBlob,
374                                 [in] UINT32 ulSymCAAttestationBlobLength,
375                                 [in, size_is(ulSymCAAttestationBlobLength)] BYTE* rgbSymCAAttestationBlob,
376                                 [out] UINT32* pulCredentialLength,
377                                 [out, size_is(, *pulCredentialLength)] BYTE** prgbCredential);
378
379    };	// end of ITCPAIdentityCreation
380
381    //ITCPAMaintenance Interface
382    [
383        local,
384        object,
385        uuid(FBCD9C25-72CB-47BB-99DD-2317551491DE),
386
387        helpstring("ITCPAMaintenance Interface"),
388        pointer_default(unique)
389    ]
390    interface ITCPAMaintenance: IUnknown
391    {
392
393// HRESULT CreateMaintenanceArchive
394// HRESULT KillMaintenanceFeature
395// HRESULT LoadMaintenancePubKey
396// HRESULT CheckMaintenancePubKey
397
398    };
399
400    //ITCPATpm Interface
401    [
402        uuid(FBCD9C21-72CB-47BB-99DD-2317551491DE),
403
404        helpstring("ITCPATpm Interface"),
405        pointer_default(unique)
406    ]
407    interface ITCPATpm : IUnknown
408    {
409        [helpstring("method GetRandom")]
410        HRESULT GetRandom([in] UINT32 ulRandomDataLength,
411                          [out, size_is(, ulRandomDataLength)] BYTE** ppbData);
412
413        [helpstring("method StirRandom")]
414        HRESULT StirRandom([in] UINT32 ulEntropyDataLength,
415                           [in, size_is(ulEntropyDataLength)] BYTE* pbData);
416
417        [helpstring("method GetCapability")]
418        HRESULT GetCapability([in] TSS_FLAG CapArea,
419                              [in] UINT32 ulSubCapLength,
420                              [in, ptr, size_is(ulSubCapLength)] BYTE* pbSubCap,
421                              [out] UINT32* pulRespDataLength,
422                              [out, size_is(, *pulRespDataLength)] BYTE** ppbRespData);
423
424        [helpstring("method GetCapabilitySigned")]
425        HRESULT GetCapabilitySigned([in] ITCPAKey* pKey,
426                            [in] TSS_FLAG CapArea,
427                            [in] UINT32 ulSubCapLength,
428                            [in, ptr, size_is(ulSubCapLength)] BYTE* pbSubCap,
429                            [in, out, ptr] TSS_VALIDATION *pValidation,
430                            [out] UINT32* pulRespDataLength,
431                            [out, size_is(, *pulRespDataLength)] BYTE** ppbRespData);
432
433// HRESULT GetEvent
434// HRESULT GetEvents
435// HRESULT GetEventLog
436
437    };
438
439    //ITCPAPersistentStorage Interface
440    [
441        local,
442        object,
443        uuid(FBCD9C1C-72CB-47BB-99DD-2317551491DE),
444
445        helpstring("ITCPAPersistentStorage Interface"),
446        pointer_default(unique)
447    ]
448    interface ITCPAPersistentStorage: IUnknown
449    {
450        [helpstring("method LoadKeyByUUID")]
451        HRESULT LoadKeyByUUID([in] TSS_FLAG persistentStorageType,
452                        [in] TSS_UUID uuidData,
453                        [out] ITCPAKey** ppKey);
454
455        [helpstring("method RegisterKey")]
456        HRESULT RegisterKey([in] ITCPAKey* pKey,
457                      [in] TSS_FLAG persistentStorageType,
458                      [in] TSS_UUID uuidKey,
459                      [in] TSS_FLAG persistentStorageTypeParent,
460                      [in] TSS_UUID uuidParentKey);
461
462        [helpstring("method UnregisterKey")]
463        HRESULT UnregisterKey([in] TSS_FLAG persistentStorageType,
464                        [in] TSS_UUID uuidKey,
465                        [out] ITCPAKey** ppKey);
466
467        [helpstring("method DeleteKeyByUUID")]
468        HRESULT DeleteKeyByUUID([in] TSS_FLAG persistentStorageType,
469                                [in] TSS_UUID uuidData);
470
471        [helpstring("method GetKeyByUUID")]
472        HRESULT GetKeyByUUID([in] TSS_FLAG persistentStorageType,
473                       [in] TSS_UUID uuidData,
474                       [out] ITCPAKey** ppKey);
475
476        [helpstring("method GetKeyByPublicInfo")]
477        HRESULT GetKeyByPublicInfo([in] TSS_FLAG persistentStorageType,
478                             [in] TSS_ALGORITHM_ID  ulAlgId,
479                             [in] UINT32 ulPublicInfoLength,
480                             [in, size_is(ulPublicInfoLength)] BYTE* pbPublicInfo,
481                             [out] ITCPAKey** ppKey);
482
483        [helpstring("method GetRegisteredKeysByUUID")]
484        HRESULT GetRegisteredKeysByUUID([in] TSS_FLAG ulPersistentStorageType,
485                                        [in] LPOLESTR wszKeyGuid,
486                                        [out] UINT32* pulKeyHierarchySize,
487                                        [out, size_is(, *pulKeyHierarchySize)] TSS_KM_KEYINFO** ppKeyHierarchy);
488    }
489
490    //ITCPAContext Interface
491    [
492        local,
493        object,
494        uuid(FBCD9C1B-72CB-47BB-99DD-2317551491DE),
495
496        helpstring("ITCPAContext Interface"),
497        pointer_default(unique)
498    ]
499    interface ITCPAContext : IUnknown
500    {
501        [helpstring("method Connect")]
502        HRESULT Connect([in, ptr] LPOLESTR wszRemoteMachine);
503
504        [helpstring("method CreateObject")]
505        HRESULT CreateObject([in] UINT32 ulObjectType,
506                             [in] UINT32 ulInitFlags,
507                             [out] IUnknown** ppUnkObject);
508
509// HRESULT CloseObject
510
511
512        [helpstring("method LoadKeyByBlob")]
513        HRESULT LoadKeyByBlob([in] ITCPAKey* pUnwrappingKey,
514                              [in] UINT32 ulBlobLength,
515                              [in, size_is(ulBlobLength)] BYTE* pbBlobData,
516                              [out] ITCPAKey** ppKey);
517
518        [helpstring("method GetTPMObject")]
519        HRESULT GetTPMObject([out] ITCPATpm** ppTPMObject);
520
521        [helpstring("method GetDefaultPolicy")]
522        HRESULT GetDefaultPolicy([out] ITCPAPolicy** ppPolicyObject);
523
524        [helpstring("method GetCapability")]
525        HRESULT GetCapability([in] TSS_FLAG ulCapArea,
526                              [in] UINT32 ulSubCapLength,
527                              [in, ptr, size_is(ulSubCapLength)] BYTE* pbSubCap,
528                              [out] UINT32* pulRespDataLength,
529                              [out, size_is(, *pulRespDataLength)] BYTE** ppbRespData);
530    };
531
532    //ITCPANonVolatileStorage Interface
533    [
534        object,
535        uuid(4730c51b-8998-43f6-993b-80befea1d404),
536
537        helpstring("ITCPANonVolatileStorage Interface"),
538        pointer_default(unique)
539    ]
540    interface ITCPANonVolatileStorage : IUnknown
541    {
542        [helpstring("method DefineSpace")]
543        HRESULT DefineSpace([in] ITCPAPcrs* pPCRsRead,
544                            [in] ITCPAPcrs* pPCRsWrite);
545
546        [helpstring("method ReleaseSpace")]
547        HRESULT ReleaseSpace();
548
549        [helpstring("method WriteValue")]
550        HRESULT WriteValue([in] UINT32 ulOffset,
551                           [in] UINT32 ulDataLength,
552                           [in, size_is(ulDataLength)] BYTE* rgbData);
553
554        [helpstring("method ReadValue")]
555        HRESULT ReadValue([in] UINT32 ulOffset,
556                          [in, out] UINT32* pulDataLength,
557                          [out, size_is(, *pulDataLength)] BYTE** prgbData);
558    };
559
560    //ITCPATransport Interface
561    [
562        object,
563        uuid(4730c51d-8998-43f6-993b-80befea1d404),
564
565        helpstring("ITCPATransport Interface"),
566        pointer_default(unique)
567    ]
568    interface ITCPATransport : IUnknown
569    {
570        [helpstring("method SetTransEncryptionKey")]
571        HRESULT SetTransEncryptionKey([in] ITCPAKey* pKey);
572
573        [helpstring("method CloseSignTransport")]
574        HRESULT CloseSignTransport([in] ITCPAKey* pSigningKey,
575                                   [in, out, ptr] TSS_VALIDATION* pValidationData);
576    };
577
578[
579    uuid(FBCD9C19-72CB-47BB-99DD-2317551491DE),
580    version(1.0),
581    helpstring("TSS Service Provider 1.0 Type Library")
582]
583library TSPLib
584{
585    importlib("stdole32.tlb");
586    importlib("stdole2.tlb");
587
588    interface ITCPAContext;
589    //TCPAContext Class
590    [
591        uuid(FBCD9C1A-72CB-47BB-99DD-2317551491DE),
592        helpstring("TCPAContext Class")
593    ]
594    coclass TCPAContext
595    {
596        [default] interface ITCPAContext;
597        interface ITCPAAttrib;
598        interface ITCPAPersistentStorage;
599    };
600
601    //TCPAContext2 Class extensions for TSS v1.2
602    [
603        uuid(4730C51E-8998-43F6-993B-80BEFEA1D404),
604        helpstring("TCPAContext2 Class")
605    ]
606    coclass TCPAContext2
607    {
608        [default] interface ITCPAContext;
609        interface ITCPAAttrib;
610        interface ITCPAPersistentStorage;
611        interface ITCPATransport;
612    };
613
614    // _ITCPACallback Interface for TCPAPolicy Class
615    [
616        uuid(FBCD9C1F-72CB-47BB-99DD-2317551491DE),
617        helpstring("_ITCPACallback Interface"),
618        pointer_default(unique)
619    ]
620    interface _ITCPACallback : IUnknown
621    {
622        [helpstring("method Tspicb_CallbackHMACAuth"), callback]
623        HRESULT Tspicb_CallbackHMACAuth([in] UINT32 PulAppData,
624                                        [in] IUnknown *PpAuthorizedObject,
625                                        [in] BOOL PfReturnOrVerify,
626                                        [in] UINT32 PulPendingFunction,
627                                        [in] BOOL PfContinueUse,
628                                        [in] UINT32 PulSizeNonces,
629                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEven,
630                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOdd,
631                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEvenOSAP,
632                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOddOSAP,
633                                        [in] UINT32 PulSizeDigestHmac,
634                                        [in, size_is(PulSizeDigestHmac)] BYTE* PrgbParamDigest,
635                                        [in, out, size_is(PulSizeDigestHmac)] BYTE* PrgbHmacData);
636
637        [helpstring("method Tspicb_CallbackXorEnc"), callback]
638        HRESULT Tspicb_CallbackXorEnc([in] UINT32 PulAppData,
639                                      [in] IUnknown *PpOSAPObject,
640                                      [in] IUnknown *PpObject,
641                                      [in] BOOL PfPurposeSecret,
642                                      [in] UINT32 PulSizeNonces,
643                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEven,
644                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOdd,
645                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEvenOSAP,
646                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOddOSAP,
647                                      [in] UINT32 PulSizeEncAuth,
648                                      [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuthUsage,
649                                      [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuthMigration);
650
651        [helpstring("method Tspicb_CallbackTakeOwnership"), callback]
652        HRESULT Tspicb_CallbackTakeOwnership([in] UINT32 PulAppData,
653                                             [in] IUnknown *PpObject,
654                                             [in] IUnknown *PpObjectPubKey,
655                                             [in] UINT32 PulSizeEncAuth,
656                                             [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuth );
657
658        [helpstring("method Tspicb_CallbackChangeAuthAsym"), callback]
659        HRESULT Tspicb_CallbackChangeAuthAsym([in] UINT32 PulAppData,
660                                              [in] IUnknown *PpObject,
661                                              [in] IUnknown *PpObjectPubKey,
662                                              [in] UINT32 PulSizeEncAuth,
663                                              [in] UINT32 PulSizeAuthLink,
664                                              [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuth,
665                                              [out, size_is(PulSizeAuthLink)] BYTE* PrgbAuthLink);
666    };   // end of _ITCPACallback
667
668    //TCPAPolicy Class
669    [
670        uuid(FBCD9C1D-72CB-47BB-99DD-2317551491DE),
671        helpstring("TCPAPolicy Class"),
672        noncreatable
673    ]
674
675    coclass TCPAPolicy
676    {
677        [default] interface ITCPAPolicy;
678        interface ITCPAAttrib;
679        [default, source] interface _ITCPACallback;
680    };
681
682    //TCPATpm Class
683    [
684        uuid(FBCD9C20-72CB-47BB-99DD-2317551491DE),
685        helpstring("TCPATpm Class"),
686        noncreatable
687    ]
688    coclass TCPATpm
689    {
690        [default] interface ITCPATpm;
691        interface ITCPAAttrib;
692        interface ITCPAAuth;
693        interface ITCPAIntegrity;
694        interface ITCPAAdministration;
695        interface ITCPAIdentityCreation;
696        interface ITCPAMaintenance;
697    };
698
699    //TCPAKey Class
700    [
701        uuid(FBCD9C26-72CB-47BB-99DD-2317551491DE),
702        helpstring("TCPAKey Class"),
703        noncreatable
704    ]
705    coclass TCPAKey
706    {
707        [default] interface ITCPAKey;
708        interface ITCPAAttrib;
709        interface ITCPAAuth;
710        interface ITCPAMigration;
711    };
712
713    //TCPAEncData Class
714    [
715        uuid(FBCD9C28-72CB-47BB-99DD-2317551491DE),
716        helpstring("TCPAEncData Class"),
717        noncreatable
718    ]
719    coclass TCPAEncData
720    {
721        [default] interface ITCPAEncData;
722        interface ITCPAAttrib;
723        interface ITCPAAuth;
724    };
725
726    //TCPAHash Class
727    [
728        uuid(FBCD9C2A-72CB-47BB-99DD-2317551491DE),
729        helpstring("TCPAHash Class"),
730        noncreatable
731    ]
732    coclass TCPAHash
733    {
734        [default] interface ITCPAHash;
735        interface ITCPAAttrib;
736    };
737
738    //TCPAPcrs Class
739    [
740        uuid(FBCD9C2C-72CB-47BB-99DD-2317551491DE),
741        helpstring("TCPAPcrs Class"),
742        noncreatable
743    ]
744    coclass TCPAPcrs
745    {
746        [default] interface ITCPAPcrs;
747    };
748
749    //TCPANonVolatileStorage Class
750    [
751        uuid(4730c51c-8998-43f6-993b-80befea1d404),
752        helpstring("TCPANonVolatileStorage Class"),
753        noncreatable
754    ]
755    coclass TCPANonVolatileStorage
756    {
757        [default] interface ITCPANonVolatileStorage;
758        interface ITCPAAttrib;
759        interface ITCPAAuth;
760    };
761
762};	// end of library TSPLib
763