Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
/*++

+++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
    [
        local,
        object,
        uuid(FBCD9C25-72CB-47BB-99DD-2317551491DE),

        helpstring("ITCPAMaintenance Interface"),
        pointer_default(unique)
    ]	
    interface ITCPAMaintenance: IUnknown
    {

// HRESULT CreateMaintenanceArchive
// HRESULT KillMaintenanceFeature
// HRESULT LoadMaintenancePubKey
// HRESULT CheckMaintenancePubKey

    };

    //ITCPATpm Interface
    [
        uuid(FBCD9C21-72CB-47BB-99DD-2317551491DE),
    
        helpstring("ITCPATpm Interface"),
        pointer_default(unique)
    ]
    interface ITCPATpm : IUnknown
    {
        [helpstring("method GetRandom")] 
        HRESULT GetRandom([in] UINT32 ulRandomDataLength, 
                          [out, size_is(, ulRandomDataLength)] BYTE** ppbData);

        [helpstring("method StirRandom")] 
        HRESULT StirRandom([in] UINT32 ulEntropyDataLength, 
                           [in, size_is(ulEntropyDataLength)] BYTE* pbData);

        [helpstring("method GetCapability")] 
        HRESULT GetCapability([in] TSS_FLAG CapArea,
                              [in] UINT32 ulSubCapLength,
                              [in, ptr, size_is(ulSubCapLength)] BYTE* pbSubCap,
                              [out] UINT32* pulRespDataLength,
                              [out, size_is(, *pulRespDataLength)] BYTE** ppbRespData);
                               
        [helpstring("method GetCapabilitySigned")] 
        HRESULT GetCapabilitySigned([in] ITCPAKey* pKey,
                            [in] TSS_FLAG CapArea,
                            [in] UINT32 ulSubCapLength,
                            [in, ptr, size_is(ulSubCapLength)] BYTE* pbSubCap,
                            [in, out, ptr] TSS_VALIDATION *pValidation,
                            [out] UINT32* pulRespDataLength,
                            [out, size_is(, *pulRespDataLength)] BYTE** ppbRespData);

// HRESULT GetEvent
// HRESULT GetEvents
// HRESULT GetEventLog

    };

    //ITCPAPersistentStorage Interface
    [
        local,
        object,
        uuid(FBCD9C1C-72CB-47BB-99DD-2317551491DE),

        helpstring("ITCPAPersistentStorage Interface"),
        pointer_default(unique)
    ]	
    interface ITCPAPersistentStorage: IUnknown
    {
        [helpstring("method LoadKeyByUUID")]
        HRESULT LoadKeyByUUID([in] TSS_FLAG persistentStorageType,
                        [in] TSS_UUID uuidData,
                        [out] ITCPAKey** ppKey);

        [helpstring("method RegisterKey")] 
        HRESULT RegisterKey([in] ITCPAKey* pKey,
                      [in] TSS_FLAG persistentStorageType,
                      [in] TSS_UUID uuidKey, 
                      [in] TSS_FLAG persistentStorageTypeParent,
                      [in] TSS_UUID uuidParentKey); 

        [helpstring("method UnregisterKey")]
        HRESULT UnregisterKey([in] TSS_FLAG persistentStorageType,
                        [in] TSS_UUID uuidKey,
                        [out] ITCPAKey** ppKey);

        [helpstring("method DeleteKeyByUUID")] 
        HRESULT DeleteKeyByUUID([in] TSS_FLAG persistentStorageType,
                                [in] TSS_UUID uuidData);

        [helpstring("method GetKeyByUUID")] 
        HRESULT GetKeyByUUID([in] TSS_FLAG persistentStorageType,
                       [in] TSS_UUID uuidData,
                       [out] ITCPAKey** ppKey);

        [helpstring("method GetKeyByPublicInfo")] 
        HRESULT GetKeyByPublicInfo([in] TSS_FLAG persistentStorageType,
                             [in] TSS_ALGORITHM_ID  ulAlgId,
                             [in] UINT32 ulPublicInfoLength,
                             [in, size_is(ulPublicInfoLength)] BYTE* pbPublicInfo,
                             [out] ITCPAKey** ppKey);

        [helpstring("method GetRegisteredKeysByUUID")] 
        HRESULT GetRegisteredKeysByUUID([in] TSS_FLAG ulPersistentStorageType,
                                        [in] LPOLESTR wszKeyGuid,
                                        [out] UINT32* pulKeyHierarchySize,
                                        [out, size_is(, *pulKeyHierarchySize)] TSS_KM_KEYINFO** ppKeyHierarchy);
    }

    //ITCPAContext Interface
    [
        local,
        object,
        uuid(FBCD9C1B-72CB-47BB-99DD-2317551491DE),
    
        helpstring("ITCPAContext Interface"),
        pointer_default(unique)
    ]
    interface ITCPAContext : IUnknown
    {
        [helpstring("method Connect")] 
        HRESULT Connect([in, ptr] LPOLESTR wszRemoteMachine);

        [helpstring("method CreateObject")] 
        HRESULT CreateObject([in] UINT32 ulObjectType, 
                             [in] UINT32 ulInitFlags,
                             [out] IUnknown** ppUnkObject);

// HRESULT CloseObject


        [helpstring("method LoadKeyByBlob")]
        HRESULT LoadKeyByBlob([in] ITCPAKey* pUnwrappingKey,
                              [in] UINT32 ulBlobLength,
                              [in, size_is(ulBlobLength)] BYTE* pbBlobData,
                              [out] ITCPAKey** ppKey);

        [helpstring("method GetTPMObject")] 
        HRESULT GetTPMObject([out] ITCPATpm** ppTPMObject);

        [helpstring("method GetDefaultPolicy")] 
        HRESULT GetDefaultPolicy([out] ITCPAPolicy** ppPolicyObject);

        [helpstring("method GetCapability")] 
        HRESULT GetCapability([in] TSS_FLAG ulCapArea,
                              [in] UINT32 ulSubCapLength,
                              [in, ptr, size_is(ulSubCapLength)] BYTE* pbSubCap,
                              [out] UINT32* pulRespDataLength,
                              [out, size_is(, *pulRespDataLength)] BYTE** ppbRespData);
    };

    //ITCPANonVolatileStorage Interface
    [
        object,
        uuid(4730c51b-8998-43f6-993b-80befea1d404),
    
        helpstring("ITCPANonVolatileStorage Interface"),
        pointer_default(unique)
    ]
    interface ITCPANonVolatileStorage : IUnknown
    {
        [helpstring("method DefineSpace")]
        HRESULT DefineSpace([in] ITCPAPcrs* pPCRsRead,
                            [in] ITCPAPcrs* pPCRsWrite);

        [helpstring("method ReleaseSpace")] 
        HRESULT ReleaseSpace();

        [helpstring("method WriteValue")] 
        HRESULT WriteValue([in] UINT32 ulOffset,
                           [in] UINT32 ulDataLength,
                           [in, size_is(ulDataLength)] BYTE* rgbData);

        [helpstring("method ReadValue")] 
        HRESULT ReadValue([in] UINT32 ulOffset,
                          [in, out] UINT32* pulDataLength,
                          [out, size_is(, *pulDataLength)] BYTE** prgbData);
    };

    //ITCPATransport Interface
    [
        object,
        uuid(4730c51d-8998-43f6-993b-80befea1d404),
    
        helpstring("ITCPATransport Interface"),
        pointer_default(unique)
    ]
    interface ITCPATransport : IUnknown
    {
        [helpstring("method SetTransEncryptionKey")]
        HRESULT SetTransEncryptionKey([in] ITCPAKey* pKey);

        [helpstring("method CloseSignTransport")] 
        HRESULT CloseSignTransport([in] ITCPAKey* pSigningKey,
                                   [in, out, ptr] TSS_VALIDATION* pValidationData);
    };

[
    uuid(FBCD9C19-72CB-47BB-99DD-2317551491DE),
    version(1.0),
    helpstring("TSS Service Provider 1.0 Type Library")
]
library TSPLib
{
    importlib("stdole32.tlb");
    importlib("stdole2.tlb");

    interface ITCPAContext;
    //TCPAContext Class
    [
        uuid(FBCD9C1A-72CB-47BB-99DD-2317551491DE),
        helpstring("TCPAContext Class")
    ]
    coclass TCPAContext
    {
        [default] interface ITCPAContext;
        interface ITCPAAttrib;
        interface ITCPAPersistentStorage;
    };

    //TCPAContext2 Class extensions for TSS v1.2
    [
        uuid(4730C51E-8998-43F6-993B-80BEFEA1D404),
        helpstring("TCPAContext2 Class")
    ]
    coclass TCPAContext2
    {
        [default] interface ITCPAContext;
        interface ITCPAAttrib;
        interface ITCPAPersistentStorage;
        interface ITCPATransport;
    };

    // _ITCPACallback Interface for TCPAPolicy Class
    [
        uuid(FBCD9C1F-72CB-47BB-99DD-2317551491DE),
        helpstring("_ITCPACallback Interface"),
        pointer_default(unique)
    ]
    interface _ITCPACallback : IUnknown
    {
        [helpstring("method Tspicb_CallbackHMACAuth"), callback] 
        HRESULT Tspicb_CallbackHMACAuth([in] UINT32 PulAppData,
                                        [in] IUnknown *PpAuthorizedObject,
                                        [in] BOOL PfReturnOrVerify,
                                        [in] UINT32 PulPendingFunction,
                                        [in] BOOL PfContinueUse,
                                        [in] UINT32 PulSizeNonces,
                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEven,
                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOdd,
                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEvenOSAP,
                                        [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOddOSAP,
                                        [in] UINT32 PulSizeDigestHmac,
                                        [in, size_is(PulSizeDigestHmac)] BYTE* PrgbParamDigest,
                                        [in, out, size_is(PulSizeDigestHmac)] BYTE* PrgbHmacData);

        [helpstring("method Tspicb_CallbackXorEnc"), callback] 
        HRESULT Tspicb_CallbackXorEnc([in] UINT32 PulAppData,
                                      [in] IUnknown *PpOSAPObject,
                                      [in] IUnknown *PpObject,
                                      [in] BOOL PfPurposeSecret,
                                      [in] UINT32 PulSizeNonces,
                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEven,
                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOdd,
                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceEvenOSAP,
                                      [in, size_is(PulSizeNonces)] BYTE* PrgbNonceOddOSAP,
                                      [in] UINT32 PulSizeEncAuth,
                                      [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuthUsage,
                                      [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuthMigration);

        [helpstring("method Tspicb_CallbackTakeOwnership"), callback] 
        HRESULT Tspicb_CallbackTakeOwnership([in] UINT32 PulAppData,
                                             [in] IUnknown *PpObject,
                                             [in] IUnknown *PpObjectPubKey,
                                             [in] UINT32 PulSizeEncAuth,
                                             [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuth );

        [helpstring("method Tspicb_CallbackChangeAuthAsym"), callback] 
        HRESULT Tspicb_CallbackChangeAuthAsym([in] UINT32 PulAppData,
                                              [in] IUnknown *PpObject,
                                              [in] IUnknown *PpObjectPubKey,
                                              [in] UINT32 PulSizeEncAuth,
                                              [in] UINT32 PulSizeAuthLink,
                                              [out, size_is(PulSizeEncAuth)] BYTE* PrgbEncAuth,
                                              [out, size_is(PulSizeAuthLink)] BYTE* PrgbAuthLink);
    };   // end of _ITCPACallback

    //TCPAPolicy Class
    [
        uuid(FBCD9C1D-72CB-47BB-99DD-2317551491DE),
        helpstring("TCPAPolicy Class"),
        noncreatable
    ]

    coclass TCPAPolicy
    {
        [default] interface ITCPAPolicy;
        interface ITCPAAttrib;
        [default, source] interface _ITCPACallback;
    };

    //TCPATpm Class
    [
        uuid(FBCD9C20-72CB-47BB-99DD-2317551491DE),
        helpstring("TCPATpm Class"),
        noncreatable
    ]
    coclass TCPATpm
    {
        [default] interface ITCPATpm;
        interface ITCPAAttrib;
        interface ITCPAAuth;
        interface ITCPAIntegrity;
        interface ITCPAAdministration;
        interface ITCPAIdentityCreation;
        interface ITCPAMaintenance;
    };

    //TCPAKey Class
    [
        uuid(FBCD9C26-72CB-47BB-99DD-2317551491DE),
        helpstring("TCPAKey Class"),
        noncreatable
    ]
    coclass TCPAKey
    {
        [default] interface ITCPAKey;
        interface ITCPAAttrib;
        interface ITCPAAuth;
        interface ITCPAMigration;
    };

    //TCPAEncData Class
    [
        uuid(FBCD9C28-72CB-47BB-99DD-2317551491DE),
        helpstring("TCPAEncData Class"),
        noncreatable
    ]
    coclass TCPAEncData
    {
        [default] interface ITCPAEncData;
        interface ITCPAAttrib;
        interface ITCPAAuth;
    };

    //TCPAHash Class
    [
        uuid(FBCD9C2A-72CB-47BB-99DD-2317551491DE),
        helpstring("TCPAHash Class"),
        noncreatable
    ]
    coclass TCPAHash
    {
        [default] interface ITCPAHash;
        interface ITCPAAttrib;
    };

    //TCPAPcrs Class
    [
        uuid(FBCD9C2C-72CB-47BB-99DD-2317551491DE),
        helpstring("TCPAPcrs Class"),
        noncreatable
    ]
    coclass TCPAPcrs
    {
        [default] interface ITCPAPcrs;
    };

    //TCPANonVolatileStorage Class
    [
        uuid(4730c51c-8998-43f6-993b-80befea1d404),
        helpstring("TCPANonVolatileStorage Class"),
        noncreatable
    ]
    coclass TCPANonVolatileStorage
    {
        [default] interface ITCPANonVolatileStorage;
        interface ITCPAAttrib;
        interface ITCPAAuth;
    };

};	// end of library TSPLib