1 #ifndef TCS_H 2 #define TCS_H 3 #include <tss/platform.h> 4 #include <tss/tss_structs.h> 5 #include <tss/tcs_typedef.h> 6 #include <tss/tcs_defines.h> 7 #include <tss/tcs_structs.h> 8 #include <tss/tcs_error.h> 9 #include <tss/tpm.h> 10 11 #if defined __cplusplus 12 extern "C" { 13 #endif 14 15 extern TSS_RESULT Tcsi_OpenContext 16 ( 17 TCS_CONTEXT_HANDLE* hContext // out 18 ); 19 extern TSS_RESULT Tcsi_CloseContext 20 ( 21 TCS_CONTEXT_HANDLE hContext // in 22 ); 23 extern TSS_RESULT Tcsi_FreeMemory 24 ( 25 TCS_CONTEXT_HANDLE hContext, // in 26 BYTE* pMemory // in 27 ); 28 extern TSS_RESULT Tcsi_GetCapability 29 ( 30 TCS_CONTEXT_HANDLE hContext, // in 31 TPM_CAPABILITY_AREA capArea, // in 32 UINT32 subCapSize, // in 33 BYTE* subCap, // in 34 UINT32* respSize, // out 35 BYTE** resp // out 36 ); 37 extern TSS_RESULT Tcsi_RegisterKey 38 ( 39 TCS_CONTEXT_HANDLE hContext, // in 40 TSS_UUID WrappingKeyUUID, // in 41 TSS_UUID KeyUUID, // in 42 UINT32 cKeySize, // in 43 BYTE* rgbKey, // in 44 UINT32 cVendorDataSize, // in 45 BYTE* gbVendorData // in 46 ); 47 extern TSS_RESULT Tcsip_UnregisterKey 48 ( 49 TCS_CONTEXT_HANDLE hContext, // in 50 TSS_UUID KeyUUID // in 51 ); 52 extern TSS_RESULT Tcsip_KeyControlOwner 53 ( 54 TCS_CONTEXT_HANDLE hContext, // in 55 TCS_KEY_HANDLE hKey, // in 56 UINT32 ulPubKeyLength, // in 57 BYTE* prgbPubKey, // in 58 UINT32 attribName, // in 59 TSS_BOOL attribValue, // in 60 TPM_AUTH* pOwnerAuth, // in, out 61 TSS_UUID* pUuidData // out 62 ); 63 extern TSS_RESULT Tcsi_EnumRegisteredKeys 64 ( 65 TCS_CONTEXT_HANDLE hContext, // in 66 TSS_UUID* pKeyUUID, // in 67 UINT32* pcKeyHierarchySize, // out 68 TSS_KM_KEYINFO** ppKeyHierarchy // out 69 ); 70 extern TSS_RESULT Tcsi_GetRegisteredKey 71 ( 72 TCS_CONTEXT_HANDLE hContext, // in 73 TSS_UUID KeyUUID, // in 74 TSS_KM_KEYINFO** ppKeyInfo // out 75 ); 76 extern TSS_RESULT Tcsi_GetRegisteredKeyBlob 77 ( 78 TCS_CONTEXT_HANDLE hContext, // in 79 TSS_UUID KeyUUID, // in 80 UINT32* pcKeySize, // out 81 BYTE** prgbKey // out 82 ); 83 extern TSS_RESULT Tcsip_GetRegisteredKeyByPublicInfo 84 ( 85 TCS_CONTEXT_HANDLE hContext, // in 86 TSS_ALGORITHM_ID algID, // in 87 UINT32 ulPublicInfoLength, // in 88 BYTE* rgbPublicInfo, // in 89 UINT32* keySize, // out 90 BYTE** keyBlob // out 91 ); 92 extern TSS_RESULT Tcsip_LoadKeyByBlob 93 ( 94 TCS_CONTEXT_HANDLE hContext, // in 95 TCS_KEY_HANDLE hUnwrappingKey, // in 96 UINT32 cWrappedKeyBlobSize, // in 97 BYTE* rgbWrappedKeyBlob, // in 98 TPM_AUTH* pAuth, // in, out 99 TCS_KEY_HANDLE* phKeyTCSI, // out 100 TCS_KEY_HANDLE* phKeyHMAC // out 101 ); 102 extern TSS_RESULT Tcsip_LoadKeyByUUID 103 ( 104 TCS_CONTEXT_HANDLE hContext, // in 105 TSS_UUID KeyUUID, // in 106 TCS_LOADKEY_INFO* pLoadKeyInfo, // in, out 107 TCS_KEY_HANDLE* phKeyTCSI // out 108 ); 109 extern TSS_RESULT Tcsip_EvictKey 110 ( 111 TCS_CONTEXT_HANDLE hContext, // in 112 TCS_KEY_HANDLE hKey // in 113 ); 114 extern TSS_RESULT Tcsip_CreateWrapKey 115 ( 116 TCS_CONTEXT_HANDLE hContext, // in 117 TCS_KEY_HANDLE hWrappingKey, // in 118 TPM_ENCAUTH KeyUsageAuth, // in 119 TPM_ENCAUTH KeyMigrationAuth, // in 120 UINT32 keyInfoSize, // in 121 BYTE* keyInfo, // in 122 TPM_AUTH* pAuth, // in, out 123 UINT32* keyDataSize, // out 124 BYTE** keyData // out 125 ); 126 extern TSS_RESULT Tcsip_GetPubKey 127 ( 128 TCS_CONTEXT_HANDLE hContext, // in 129 TCS_KEY_HANDLE hKey, // in 130 TPM_AUTH* pAuth, // in, out 131 UINT32* pcPubKeySize, // out 132 BYTE** prgbPubKey // out 133 ); 134 extern TSS_RESULT Tcsip_MakeIdentity 135 ( 136 TCS_CONTEXT_HANDLE hContext, // in 137 TPM_ENCAUTH identityAuth, // in 138 TPM_CHOSENID_HASH IDLabel_PrivCAHash, // in 139 UINT32 idIdentityKeyInfoSize, // in 140 BYTE* idIdentityKeyInfo, // in 141 TPM_AUTH* pSrkAuth, // in, out 142 TPM_AUTH* pOwnerAuth, // in, out 143 UINT32* idIdentityKeySize, // out 144 BYTE** idIdentityKey, // out 145 UINT32* pcIdentityBindingSize, // out 146 BYTE** prgbIdentityBinding, // out 147 UINT32* pcEndorsementCredentialSize, // out 148 BYTE** prgbEndorsementCredential, // out 149 UINT32* pcPlatformCredentialSize, // out 150 BYTE** prgbPlatformCredential, // out 151 UINT32* pcConformanceCredentialSize, // out 152 BYTE** prgbConformanceCredential // out 153 ); 154 extern TSS_RESULT Tcsip_MakeIdentity2 155 ( 156 TCS_CONTEXT_HANDLE hContext, // in 157 TPM_ENCAUTH identityAuth, // in 158 TPM_CHOSENID_HASH IDLabel_PrivCAHash, // in 159 UINT32 idIdentityKeyInfoSize, // in 160 BYTE* idIdentityKeyInfo, // in 161 TPM_AUTH* pSrkAuth, // in, out 162 TPM_AUTH* pOwnerAuth, // in, out 163 UINT32* idIdentityKeySize, // out 164 BYTE** idIdentityKey, // out 165 UINT32* pcIdentityBindingSize, // out 166 BYTE** prgbIdentityBinding // out 167 ); 168 extern TSS_RESULT Tcsi_LogPcrEvent 169 ( 170 TCS_CONTEXT_HANDLE hContext, // in 171 TSS_PCR_EVENT Event, // in 172 UINT32* pNumber // out 173 ); 174 extern TSS_RESULT Tcsi_GetPcrEvent 175 ( 176 TCS_CONTEXT_HANDLE hContext, // in 177 UINT32 PcrIndex, // in 178 UINT32* pNumber, // in, out 179 TSS_PCR_EVENT** ppEvent // out 180 ); 181 extern TSS_RESULT Tcsi_GetPcrEventsByPcr 182 ( 183 TCS_CONTEXT_HANDLE hContext, // in 184 UINT32 PcrIndex, // in 185 UINT32 FirstEvent, // in 186 UINT32* pEventCount, // in, out 187 TSS_PCR_EVENT** ppEvents // out 188 ); 189 extern TSS_RESULT Tcsi_GetPcrEventLog 190 ( 191 TCS_CONTEXT_HANDLE hContext, // in 192 UINT32* pEventCount, // out 193 TSS_PCR_EVENT** ppEvents // out 194 ); 195 extern TSS_RESULT Tcsip_SetOwnerInstall 196 ( 197 TCS_CONTEXT_HANDLE hContext, // in 198 TSS_BOOL state // in 199 ); 200 extern TSS_RESULT Tcsip_TakeOwnership 201 ( 202 TCS_CONTEXT_HANDLE hContext, // in 203 UINT16 protocolID, // in 204 UINT32 encOwnerAuthSize, // in 205 BYTE* encOwnerAuth, // in 206 UINT32 encSrkAuthSize, // in 207 BYTE* encSrkAuth, // in 208 UINT32 srkKeyInfoSize, // in 209 BYTE* srkKeyInfo, // in 210 TPM_AUTH* ownerAuth, // in, out 211 UINT32* srkKeyDataSize, // out 212 BYTE** srkKeyData // out 213 ); 214 extern TSS_RESULT Tcsip_SetOperatorAuth 215 ( 216 TCS_CONTEXT_HANDLE hContext, // in 217 TPM_SECRET operatorAuth // in 218 ); 219 extern TSS_RESULT Tcsip_OIAP 220 ( 221 TCS_CONTEXT_HANDLE hContext, // in 222 TCS_AUTHHANDLE* authHandle, // out 223 TPM_NONCE* nonce0 // out 224 ); 225 extern TSS_RESULT Tcsip_OSAP 226 ( 227 TCS_CONTEXT_HANDLE hContext, // in 228 TPM_ENTITY_TYPE entityType, // in 229 UINT32 entityValue, // in 230 TPM_NONCE nonceOddOSAP, // in 231 TCS_AUTHHANDLE* authHandle, // out 232 TPM_NONCE* nonceEven, // out 233 TPM_NONCE* nonceEvenOSAP // out 234 ); 235 extern TSS_RESULT Tcsip_ChangeAuth 236 ( 237 TCS_CONTEXT_HANDLE hContext, // in 238 TCS_KEY_HANDLE parentHandle, // in 239 TPM_PROTOCOL_ID protocolID, // in 240 TPM_ENCAUTH newAuth, // in 241 TPM_ENTITY_TYPE entityType, // in 242 UINT32 encDataSize, // in 243 BYTE* encData, // in 244 TPM_AUTH* ownerAuth, // in, out 245 TPM_AUTH* entityAuth, // in, out 246 UINT32* outDataSize, // out 247 BYTE** outData // out 248 ); 249 extern TSS_RESULT Tcsip_ChangeAuthOwner 250 ( 251 TCS_CONTEXT_HANDLE hContext, // in 252 TPM_PROTOCOL_ID protocolID, // in 253 TPM_ENCAUTH newAuth, // in 254 TPM_ENTITY_TYPE entityType, // in 255 TPM_AUTH* ownerAuth // in, out 256 ); 257 extern TSS_RESULT Tcsip_ChangeAuthAsymStart 258 ( 259 TCS_CONTEXT_HANDLE hContext, // in 260 TCS_KEY_HANDLE idHandle, // in 261 TPM_NONCE antiReplay, // in 262 UINT32 TempKeyInfoSize, // in 263 BYTE* TempKeyInfoData, // in 264 TPM_AUTH* pAuth, // in, out 265 UINT32* TempKeySize, // out 266 BYTE** TempKeyData, // out 267 UINT32* CertifyInfoSize, // out 268 BYTE** CertifyInfo, // out 269 UINT32* sigSize, // out 270 BYTE** sig, // out 271 TCS_KEY_HANDLE* ephHandle // out 272 ); 273 extern TSS_RESULT Tcsip_ChangeAuthAsymFinish 274 ( 275 TCS_CONTEXT_HANDLE hContext, // in 276 TCS_KEY_HANDLE parentHandle, // in 277 TCS_KEY_HANDLE ephHandle, // in 278 TPM_ENTITY_TYPE entityType, // in 279 TPM_HMAC newAuthLink, // in 280 UINT32 newAuthSize, // in 281 BYTE* encNewAuth, // in 282 UINT32 encDataSizeIn, // in 283 BYTE* encDataIn, // in 284 TPM_AUTH* ownerAuth, // in, out 285 UINT32* encDataSizeOut, // out 286 BYTE** encDataOut, // out 287 TPM_NONCE* saltNonce, // out 288 TPM_DIGEST* changeProof // out 289 ); 290 extern TSS_RESULT Tcsip_TerminateHandle 291 ( 292 TCS_CONTEXT_HANDLE hContext, // in 293 TCS_AUTHHANDLE handle // in 294 ); 295 extern TSS_RESULT Tcsip_ActivateTPMIdentity 296 ( 297 TCS_CONTEXT_HANDLE hContext, // in 298 TCS_KEY_HANDLE idKey, // in 299 UINT32 blobSize, // in 300 BYTE* blob, // in 301 TPM_AUTH* idKeyAuth, // in, out 302 TPM_AUTH* ownerAuth, // in, out 303 UINT32* SymmetricKeySize, // out 304 BYTE** SymmetricKey // out 305 ); 306 extern TSS_RESULT Tcsip_EstablishTransport 307 ( 308 TCS_CONTEXT_HANDLE hContext, // in 309 UINT32 ulTransControlFlags, // in 310 TCS_KEY_HANDLE hEncKey, // in 311 UINT32 ulTransSessionInfoSize, // in 312 BYTE* rgbTransSessionInfo, // in 313 UINT32 ulSecretSize, // in 314 BYTE* rgbSecret, // in 315 TPM_AUTH* pEncKeyAuth, // in, out 316 TPM_MODIFIER_INDICATOR* pbLocality, // out 317 TCS_HANDLE* hTransSession, // out 318 UINT32* ulCurrentTicksSize, // out 319 BYTE** prgbCurrentTicks, // out 320 TPM_NONCE* pTransNonce // out 321 ); 322 extern TSS_RESULT Tcsip_ExecuteTransport 323 ( 324 TCS_CONTEXT_HANDLE hContext, // in 325 TPM_COMMAND_CODE unWrappedCommandOrdinal, // in 326 UINT32 ulWrappedCmdParamInSize, // in 327 BYTE* rgbWrappedCmdParamIn, // in 328 UINT32* pulHandleListSize, // in, out 329 TCS_HANDLE** rghHandles, // in, out 330 TPM_AUTH* pWrappedCmdAuth1, // in, out 331 TPM_AUTH* pWrappedCmdAuth2, // in, out 332 TPM_AUTH* pTransAuth, // in, out 333 UINT64* punCurrentTicks, // out 334 TPM_MODIFIER_INDICATOR* pbLocality, // out 335 TPM_RESULT* pulWrappedCmdReturnCode, // out 336 UINT32* ulWrappedCmdParamOutSize, // out 337 BYTE** rgbWrappedCmdParamOut // out 338 ); 339 extern TSS_RESULT Tcsip_ReleaseTransportSigned 340 ( 341 TCS_CONTEXT_HANDLE hContext, // in 342 TCS_KEY_HANDLE hSignatureKey, // in 343 TPM_NONCE AntiReplayNonce, // in 344 TPM_AUTH* pKeyAuth, // in, out 345 TPM_AUTH* pTransAuth, // in, out 346 TPM_MODIFIER_INDICATOR* pbLocality, // out 347 UINT32* pulCurrentTicksSize, // out 348 BYTE** prgbCurrentTicks, // out 349 UINT32* pulSignatureSize, // out 350 BYTE** prgbSignature // out 351 ); 352 extern TSS_RESULT Tcsip_Extend 353 ( 354 TCS_CONTEXT_HANDLE hContext, // in 355 TPM_PCRINDEX pcrNum, // in 356 TPM_DIGEST inDigest, // in 357 TPM_PCRVALUE* outDigest // out 358 ); 359 extern TSS_RESULT Tcsip_PcrRead 360 ( 361 TCS_CONTEXT_HANDLE hContext, // in 362 TPM_PCRINDEX pcrNum, // in 363 TPM_PCRVALUE* outDigest // out 364 ); 365 extern TSS_RESULT Tcsip_Quote 366 ( 367 TCS_CONTEXT_HANDLE hContext, // in 368 TCS_KEY_HANDLE keyHandle, // in 369 TPM_NONCE antiReplay, // in 370 UINT32 pcrTargetSize, // in 371 BYTE* pcrTarget, // in 372 TPM_AUTH* privAuth, // in, out 373 UINT32* pcrDataSize, // out 374 BYTE** pcrData, // out 375 UINT32* sigSize, // out 376 BYTE** sig // out 377 ); 378 extern TSS_RESULT Tcsip_Quote2 379 ( 380 TCS_CONTEXT_HANDLE hContext, // in 381 TCS_KEY_HANDLE keyHandle, // in 382 TPM_NONCE antiReplay, // in 383 UINT32 pcrTargetSize, // in 384 BYTE* pcrTarget, // in 385 TSS_BOOL addVersion, // in 386 TPM_AUTH* privAuth, // in, out 387 UINT32* pcrDataSize, // out 388 BYTE** pcrData, // out 389 UINT32* versionInfoSize, // out 390 BYTE** versionInfo, // out 391 UINT32* sigSize, // out 392 BYTE** sig // out 393 ); 394 extern TSS_RESULT Tcsip_DirWriteAuth 395 ( 396 TCS_CONTEXT_HANDLE hContext, // in 397 TPM_DIRINDEX dirIndex, // in 398 TPM_DIRVALUE newContents, // in 399 TPM_AUTH* ownerAuth // in, out 400 ); 401 extern TSS_RESULT Tcsip_DirRead 402 ( 403 TCS_CONTEXT_HANDLE hContext, // in 404 TPM_DIRINDEX dirIndex, // in 405 TPM_DIRVALUE* dirValue // out 406 ); 407 extern TSS_RESULT Tcsip_Seal 408 ( 409 TCS_CONTEXT_HANDLE hContext, // in 410 TCS_KEY_HANDLE keyHandle, // in 411 TPM_ENCAUTH encAuth, // in 412 UINT32 pcrInfoSize, // in 413 BYTE* PcrInfo, // in 414 UINT32 inDataSize, // in 415 BYTE* inData, // in 416 TPM_AUTH* pubAuth, // in, out 417 UINT32* SealedDataSize, // out 418 BYTE** SealedData // out 419 ); 420 extern TSS_RESULT Tcsip_Unseal 421 ( 422 TCS_CONTEXT_HANDLE hContext, // in 423 TCS_KEY_HANDLE keyHandle, // in 424 UINT32 SealedDataSize, // in 425 BYTE* SealedData, // in 426 TPM_AUTH* keyAuth, // in, out 427 TPM_AUTH* dataAuth, // in, out 428 UINT32* DataSize, // out 429 BYTE** Data // out 430 ); 431 extern TSS_RESULT Tcsip_UnBind 432 ( 433 TCS_CONTEXT_HANDLE hContext, // in 434 TCS_KEY_HANDLE keyHandle, // in 435 UINT32 inDataSize, // in 436 BYTE* inData, // in 437 TPM_AUTH* privAuth, // in, out 438 UINT32* outDataSize, // out 439 BYTE** outData // out 440 ); 441 extern TSS_RESULT Tcsip_Sealx 442 ( 443 TCS_CONTEXT_HANDLE hContext, // in 444 TCS_KEY_HANDLE keyHandle, // in 445 TPM_ENCAUTH encAuth, // in 446 UINT32 pcrInfoSize, // in 447 BYTE* PcrInfo, // in 448 UINT32 inDataSize, // in 449 BYTE* inData, // in 450 TPM_AUTH* pubAuth, // in, out 451 UINT32* SealedDataSize, // out 452 BYTE** SealedData // out 453 ); 454 extern TSS_RESULT Tcsip_LoadKey2ByBlob 455 ( 456 TCS_CONTEXT_HANDLE hContext, // in 457 TCS_KEY_HANDLE hUnwrappingKey, // in 458 UINT32 cWrappedKeyBlobSize, // in 459 BYTE* rgbWrappedKeyBlob, // in 460 TPM_AUTH* pAuth, // in, out 461 TCS_KEY_HANDLE* phKeyTCSI // out 462 ); 463 extern TSS_RESULT Tcsip_CreateMigrationBlob 464 ( 465 TCS_CONTEXT_HANDLE hContext, // in 466 TCS_KEY_HANDLE parentHandle, // in 467 TSS_MIGRATE_SCHEME migrationType, // in 468 UINT32 MigrationKeyAuthSize, // in 469 BYTE* MigrationKeyAuth, // in 470 UINT32 encDataSize, // in 471 BYTE* encData, // in 472 TPM_AUTH* parentAuth, // in, out 473 TPM_AUTH* entityAuth, // in, out 474 UINT32* randomSize, // out 475 BYTE** random, // out 476 UINT32* outDataSize, // out 477 BYTE** outData // out 478 ); 479 extern TSS_RESULT Tcsip_ConvertMigrationBlob 480 ( 481 TCS_CONTEXT_HANDLE hContext, // in 482 TCS_KEY_HANDLE parentHandle, // in 483 UINT32 inDataSize, // in 484 BYTE* inData, // in 485 UINT32 randomSize, // in 486 BYTE* random, // in 487 TPM_AUTH* parentAuth, // in, out 488 UINT32* outDataSize, // out 489 BYTE** outData // out 490 ); 491 extern TSS_RESULT Tcsip_AuthorizeMigrationKey 492 ( 493 TCS_CONTEXT_HANDLE hContext, // in 494 TSS_MIGRATE_SCHEME migrateScheme, // in 495 UINT32 MigrationKeySize, // in 496 BYTE* MigrationKey, // in 497 TPM_AUTH* ownerAuth, // in, out 498 UINT32* MigrationKeyAuthSize, // out 499 BYTE** MigrationKeyAuth // out 500 ); 501 extern TSS_RESULT Tcsip_CertifyKey 502 ( 503 TCS_CONTEXT_HANDLE hContext, // in 504 TCS_KEY_HANDLE certHandle, // in 505 TCS_KEY_HANDLE keyHandle, // in 506 TPM_NONCE antiReplay, // in 507 TPM_AUTH* certAuth, // in, out 508 TPM_AUTH* keyAuth, // in, out 509 UINT32* CertifyInfoSize, // out 510 BYTE** CertifyInfo, // out 511 UINT32* outDataSize, // out 512 BYTE** outData // out 513 ); 514 extern TSS_RESULT Tcsip_CertifyKey2 515 ( 516 TCS_CONTEXT_HANDLE hContext, // in 517 TCS_KEY_HANDLE certHandle, // in 518 TCS_KEY_HANDLE keyHandle, // in 519 TPM_DIGEST MSAdigest, // in 520 TPM_NONCE antiReplay, // in 521 TPM_AUTH* certAuth, // in, out 522 TPM_AUTH* keyAuth, // in, out 523 UINT32* CertifyInfoSize, // out 524 BYTE** CertifyInfo, // out 525 UINT32* outDataSize, // out 526 BYTE** outData // out 527 ); 528 extern TSS_RESULT Tcsip_Sign 529 ( 530 TCS_CONTEXT_HANDLE hContext, // in 531 TCS_KEY_HANDLE keyHandle, // in 532 UINT32 areaToSignSize, // in 533 BYTE* areaToSign, // in 534 TPM_AUTH* privAuth, // in, out 535 UINT32* sigSize, // out 536 BYTE** sig // out 537 ); 538 extern TSS_RESULT Tcsip_GetRandom 539 ( 540 TCS_CONTEXT_HANDLE hContext, // in 541 UINT32* bytesRequested, // in, out 542 BYTE** randomBytes // out 543 ); 544 extern TSS_RESULT Tcsip_StirRandom 545 ( 546 TCS_CONTEXT_HANDLE hContext, // in 547 UINT32 inDataSize, // in 548 BYTE* inData // in 549 ); 550 extern TSS_RESULT Tcsip_GetCapability 551 ( 552 TCS_CONTEXT_HANDLE hContext, // in 553 TPM_CAPABILITY_AREA capArea, // in 554 UINT32 subCapSize, // in 555 BYTE* subCap, // in 556 UINT32* respSize, // out 557 BYTE** resp // out 558 ); 559 extern TSS_RESULT Tcsip_GetCapabilitySigned 560 ( 561 TCS_CONTEXT_HANDLE hContext, // in 562 TCS_KEY_HANDLE keyHandle, // in 563 TPM_NONCE antiReplay, // in 564 TPM_CAPABILITY_AREA capArea, // in 565 UINT32 subCapSize, // in 566 BYTE* subCap, // in 567 TPM_AUTH* privAuth, // in, out 568 TPM_VERSION* Version, // out 569 UINT32* respSize, // out 570 BYTE** resp, // out 571 UINT32* sigSize, // out 572 BYTE** sig // out 573 ); 574 extern TSS_RESULT Tcsip_GetCapabilityOwner 575 ( 576 TCS_CONTEXT_HANDLE hContext, // in 577 TPM_AUTH* pOwnerAuth, // in, out 578 TPM_VERSION* pVersion, // out 579 UINT32* pNonVolatileFlags, // out 580 UINT32* pVolatileFlags // out 581 ); 582 extern TSS_RESULT Tcsip_CreateEndorsementKeyPair 583 ( 584 TCS_CONTEXT_HANDLE hContext, // in 585 TPM_NONCE antiReplay, // in 586 UINT32 endorsementKeyInfoSize, // in 587 BYTE* endorsementKeyInfo, // in 588 UINT32* endorsementKeySize, // out 589 BYTE** endorsementKey, // out 590 TPM_DIGEST* checksum // out 591 ); 592 extern TSS_RESULT Tcsip_ReadPubek 593 ( 594 TCS_CONTEXT_HANDLE hContext, // in 595 TPM_NONCE antiReplay, // in 596 UINT32* pubEndorsementKeySize, // out 597 BYTE** pubEndorsementKey, // out 598 TPM_DIGEST* checksum // out 599 ); 600 extern TSS_RESULT Tcsip_DisablePubekRead 601 ( 602 TCS_CONTEXT_HANDLE hContext, // in 603 TPM_AUTH* ownerAuth // in, out 604 ); 605 extern TSS_RESULT Tcsip_OwnerReadPubek 606 ( 607 TCS_CONTEXT_HANDLE hContext, // in 608 TPM_AUTH* ownerAuth, // in, out 609 UINT32* pubEndorsementKeySize, // out 610 BYTE** pubEndorsementKey // out 611 ); 612 extern TSS_RESULT Tcsip_SelfTestFull 613 ( 614 TCS_CONTEXT_HANDLE hContext // in 615 ); 616 extern TSS_RESULT Tcsip_CertifySelfTest 617 ( 618 TCS_CONTEXT_HANDLE hContext, // in 619 TCS_KEY_HANDLE keyHandle, // in 620 TPM_NONCE antiReplay, // in 621 TPM_AUTH* privAuth, // in, out 622 UINT32* sigSize, // out 623 BYTE** sig // out 624 ); 625 extern TSS_RESULT Tcsip_ContinueSelfTest 626 ( 627 TCS_CONTEXT_HANDLE hContext // in 628 ); 629 extern TSS_RESULT Tcsip_GetTestResult 630 ( 631 TCS_CONTEXT_HANDLE hContext, // in 632 UINT32* outDataSize, // out 633 BYTE** outData // out 634 ); 635 extern TSS_RESULT Tcsip_OwnerSetDisable 636 ( 637 TCS_CONTEXT_HANDLE hContext, // in 638 TSS_BOOL disableState, // in 639 TPM_AUTH* ownerAuth // in, out 640 ); 641 extern TSS_RESULT Tcsip_OwnerClear 642 ( 643 TCS_CONTEXT_HANDLE hContext, // in 644 TPM_AUTH* ownerAuth // in, out 645 ); 646 extern TSS_RESULT Tcsip_DisableOwnerClear 647 ( 648 TCS_CONTEXT_HANDLE hContext, // in 649 TPM_AUTH* ownerAuth // in, out 650 ); 651 extern TSS_RESULT Tcsip_ForceClear 652 ( 653 TCS_CONTEXT_HANDLE hContext // in 654 ); 655 extern TSS_RESULT Tcsip_DisableForceClear 656 ( 657 TCS_CONTEXT_HANDLE hContext // in 658 ); 659 extern TSS_RESULT Tcsip_PhysicalDisable 660 ( 661 TCS_CONTEXT_HANDLE hContext // in 662 ); 663 extern TSS_RESULT Tcsip_PhysicalEnable 664 ( 665 TCS_CONTEXT_HANDLE hContext // in 666 ); 667 extern TSS_RESULT Tcsip_PhysicalSetDeactivated 668 ( 669 TCS_CONTEXT_HANDLE hContext, // in 670 TSS_BOOL state // in 671 ); 672 extern TSS_RESULT Tcsip_SetTempDeactivated 673 ( 674 TCS_CONTEXT_HANDLE hContext // in 675 ); 676 extern TSS_RESULT Tcsip_SetTempDeactivated2 677 ( 678 TCS_CONTEXT_HANDLE hContext, // in 679 TPM_AUTH* pOperatorAuth // in, out 680 ); 681 extern TSS_RESULT Tcsip_OwnerReadInternalPub 682 ( 683 TCS_CONTEXT_HANDLE hContext, // in 684 TCS_KEY_HANDLE hKey, // in 685 TPM_AUTH* pOwnerAuth, // in, out 686 UINT32* punPubKeySize, // out 687 BYTE** ppbPubKeyData // out 688 ); 689 extern TSS_RESULT Tcsip_PhysicalPresence 690 ( 691 TCS_CONTEXT_HANDLE hContext, // in 692 TPM_PHYSICAL_PRESENCE fPhysicalPresence // in 693 ); 694 extern TSS_RESULT Tcsip_FieldUpgrade 695 ( 696 TCS_CONTEXT_HANDLE hContext, // in 697 UINT32 dataInSize, // in 698 BYTE* dataIn, // in 699 TPM_AUTH* ownerAuth, // in, out 700 UINT32* dataOutSize, // out 701 BYTE** dataOut // out 702 ); 703 extern TSS_RESULT Tcsip_ResetLockValue 704 ( 705 TCS_CONTEXT_HANDLE hContext, // in 706 TPM_AUTH* ownerAuth // in, out 707 ); 708 extern TSS_RESULT Tcsip_FlushSpecific 709 ( 710 TCS_CONTEXT_HANDLE hContext, // in 711 TCS_HANDLE hResHandle, // in 712 TPM_RESOURCE_TYPE resourceType // in 713 ); 714 extern TSS_RESULT Tcsip_SetRedirection 715 ( 716 TCS_CONTEXT_HANDLE hContext, // in 717 TCS_KEY_HANDLE keyHandle, // in 718 UINT32 c1, // in 719 UINT32 c2, // in 720 TPM_AUTH* privAuth // in, out 721 ); 722 extern TSS_RESULT Tcsip_DSAP 723 ( 724 TCS_CONTEXT_HANDLE hContext, // in 725 TPM_ENTITY_TYPE entityType, // in 726 TCS_KEY_HANDLE keyHandle, // in 727 TPM_NONCE nonceOddDSAP, // in 728 UINT32 entityValueSize, // in 729 BYTE* entityValue, // in 730 TCS_AUTHHANDLE* authHandle, // out 731 TPM_NONCE* nonceEven, // out 732 TPM_NONCE* nonceEvenDSAP // out 733 ); 734 extern TSS_RESULT Tcsip_Delegate_Manage 735 ( 736 TCS_CONTEXT_HANDLE hContext, // in 737 TPM_FAMILY_ID familyID, // in 738 TPM_FAMILY_OPERATION opFlag, // in 739 UINT32 opDataSize, // in 740 BYTE* opData, // in 741 TPM_AUTH* ownerAuth, // in, out 742 UINT32* retDataSize, // out 743 BYTE** retData // out 744 ); 745 extern TSS_RESULT Tcsip_Delegate_CreateKeyDelegation 746 ( 747 TCS_CONTEXT_HANDLE hContext, // in 748 TCS_KEY_HANDLE hKey, // in 749 UINT32 publicInfoSize, // in 750 BYTE* publicInfo, // in 751 TPM_ENCAUTH encDelAuth, // in 752 TPM_AUTH* keyAuth, // in, out 753 UINT32* blobSize, // out 754 BYTE** blob // out 755 ); 756 extern TSS_RESULT Tcsip_Delegate_CreateOwnerDelegation 757 ( 758 TCS_CONTEXT_HANDLE hContext, // in 759 TSS_BOOL increment, // in 760 UINT32 publicInfoSize, // in 761 BYTE* publicInfo, // in 762 TPM_ENCAUTH encDelAuth, // in 763 TPM_AUTH* ownerAuth, // in, out 764 UINT32* blobSize, // out 765 BYTE** blob // out 766 ); 767 extern TSS_RESULT Tcsip_Delegate_LoadOwnerDelegation 768 ( 769 TCS_CONTEXT_HANDLE hContext, // in 770 TPM_DELEGATE_INDEX index, // in 771 UINT32 blobSize, // in 772 BYTE* blob, // in 773 TPM_AUTH* ownerAuth // in, out 774 ); 775 extern TSS_RESULT Tcsip_Delegate_UpdateVerificationCount 776 ( 777 TCS_CONTEXT_HANDLE hContext, // in 778 UINT32 inputSize, // in 779 BYTE* input, // in 780 TPM_AUTH* ownerAuth, // in, out 781 UINT32* outputSize, // out 782 BYTE** output // out 783 ); 784 extern TSS_RESULT Tcsip_Delegate_VerifyDelegation 785 ( 786 TCS_CONTEXT_HANDLE hContext, // in 787 UINT32 delegateSize, // in 788 BYTE* delegate // in 789 ); 790 extern TSS_RESULT Tcsip_Delegate_ReadTable 791 ( 792 TCS_CONTEXT_HANDLE hContext, // in 793 UINT32* pulFamilyTableSize, // out 794 BYTE** ppFamilyTable, // out 795 UINT32* pulDelegateTableSize, // out 796 BYTE** ppDelegateTable // out 797 ); 798 extern TSS_RESULT Tcsip_NV_DefineOrReleaseSpace 799 ( 800 TCS_CONTEXT_HANDLE hContext, // in 801 UINT32 cPubInfoSize, // in 802 BYTE* pPubInfo, // in 803 TPM_ENCAUTH encAuth, // in 804 TPM_AUTH* pAuth // in, out 805 ); 806 extern TSS_RESULT Tcsip_NV_WriteValue 807 ( 808 TCS_CONTEXT_HANDLE hContext, // in 809 TSS_NV_INDEX hNVStore, // in 810 UINT32 offset, // in 811 UINT32 ulDataLength, // in 812 BYTE* rgbDataToWrite, // in 813 TPM_AUTH* privAuth // in, out 814 ); 815 extern TSS_RESULT Tcsip_NV_WriteValueAuth 816 ( 817 TCS_CONTEXT_HANDLE hContext, // in 818 TSS_NV_INDEX hNVStore, // in 819 UINT32 offset, // in 820 UINT32 ulDataLength, // in 821 BYTE* rgbDataToWrite, // in 822 TPM_AUTH* NVAuth // in, out 823 ); 824 extern TSS_RESULT Tcsip_NV_ReadValue 825 ( 826 TCS_CONTEXT_HANDLE hContext, // in 827 TSS_NV_INDEX hNVStore, // in 828 UINT32 offset, // in 829 UINT32* pulDataLength, // in, out 830 TPM_AUTH* privAuth, // in, out 831 BYTE** rgbDataRead // out 832 ); 833 extern TSS_RESULT Tcsip_NV_ReadValueAuth 834 ( 835 TCS_CONTEXT_HANDLE hContext, // in 836 TSS_NV_INDEX hNVStore, // in 837 UINT32 offset, // in 838 UINT32* pulDataLength, // in, out 839 TPM_AUTH* NVAuth, // in, out 840 BYTE** rgbDataRead // out 841 ); 842 extern TSS_RESULT Tcsip_CreateMaintenanceArchive 843 ( 844 TCS_CONTEXT_HANDLE hContext, // in 845 TSS_BOOL generateRandom, // in 846 TPM_AUTH* ownerAuth, // in, out 847 UINT32* randomSize, // out 848 BYTE** random, // out 849 UINT32* archiveSize, // out 850 BYTE** archive // out 851 ); 852 extern TSS_RESULT Tcsip_LoadMaintenanceArchive 853 ( 854 TCS_CONTEXT_HANDLE hContext, // in 855 UINT32 dataInSize, // in 856 BYTE* dataIn, // in 857 TPM_AUTH* ownerAuth, // in, out 858 UINT32* dataOutSize, // out 859 BYTE** dataOut // out 860 ); 861 extern TSS_RESULT Tcsip_KillMaintenanceFeature 862 ( 863 TCS_CONTEXT_HANDLE hContext, // in 864 TPM_AUTH* ownerAuth // in, out 865 ); 866 extern TSS_RESULT Tcsip_LoadManuMaintPub 867 ( 868 TCS_CONTEXT_HANDLE hContext, // in 869 TPM_NONCE antiReplay, // in 870 UINT32 PubKeySize, // in 871 BYTE* PubKey, // in 872 TPM_DIGEST* checksum // out 873 ); 874 extern TSS_RESULT Tcsip_ReadManuMaintPub 875 ( 876 TCS_CONTEXT_HANDLE hContext, // in 877 TPM_NONCE antiReplay, // in 878 TPM_DIGEST* checksum // out 879 ); 880 extern TSS_RESULT Tcsip_CreateRevocableEndorsementKeyPair 881 ( 882 TCS_CONTEXT_HANDLE hContext, // in 883 TPM_NONCE antiReplay, // in 884 UINT32 endorsementKeyInfoSize, // in 885 BYTE* endorsementKeyInfo, // in 886 TSS_BOOL GenResetAuth, // in 887 TPM_DIGEST* EKResetAuth, // in, out 888 UINT32* endorsementKeySize, // out 889 BYTE** endorsementKey, // out 890 TPM_DIGEST* checksum // out 891 ); 892 extern TSS_RESULT Tcsip_RevokeEndorsementKeyPair 893 ( 894 TCS_CONTEXT_HANDLE hContext, // in 895 TPM_DIGEST EKResetAuth // in 896 ); 897 extern TSS_RESULT Tcsip_PcrReset 898 ( 899 TCS_CONTEXT_HANDLE hContext, // in 900 UINT32 pcrTargetSize, // in 901 BYTE* pcrTarget // in 902 ); 903 extern TSS_RESULT Tcsip_ReadCounter 904 ( 905 TCS_CONTEXT_HANDLE hContext, // in 906 TSS_COUNTER_ID idCounter, // in 907 TPM_COUNTER_VALUE* counterValue // out 908 ); 909 extern TSS_RESULT Tcsip_CreateCounter 910 ( 911 TCS_CONTEXT_HANDLE hContext, // in 912 UINT32 LabelSize, // in (=4) 913 BYTE* pLabel, // in 914 TPM_ENCAUTH CounterAuth, // in 915 TPM_AUTH* pOwnerAuth, // in, out 916 TSS_COUNTER_ID* idCounter, // out 917 TPM_COUNTER_VALUE* counterValue // out 918 ); 919 extern TSS_RESULT Tcsip_IncrementCounter 920 ( 921 TCS_CONTEXT_HANDLE hContext, // in 922 TSS_COUNTER_ID idCounter, // in 923 TPM_AUTH* pCounterAuth, // in, out 924 TPM_COUNTER_VALUE* counterValue // out 925 ); 926 extern TSS_RESULT Tcsip_ReleaseCounter 927 ( 928 TCS_CONTEXT_HANDLE hContext, // in 929 TSS_COUNTER_ID idCounter, // in 930 TPM_AUTH* pCounterAuth // in, out 931 ); 932 extern TSS_RESULT Tcsip_ReleaseCounterOwner 933 ( 934 TCS_CONTEXT_HANDLE hContext, // in 935 TSS_COUNTER_ID idCounter, // in 936 TPM_AUTH* pOwnerAuth // in, out 937 ); 938 extern TSS_RESULT Tcsip_ReadCurrentTicks 939 ( 940 TCS_CONTEXT_HANDLE hContext, // in 941 UINT32* pulCurrentTimeSize, // out 942 BYTE** prgbCurrentTime // out 943 ); 944 extern TSS_RESULT Tcsip_TickStampBlob 945 ( 946 TCS_CONTEXT_HANDLE hContext, // in 947 TCS_KEY_HANDLE hKey, // in 948 TPM_NONCE antiReplay, // in 949 TPM_DIGEST digestToStamp, // in 950 TPM_AUTH* privAuth, // in, out 951 UINT32* pulSignatureLength, // out 952 BYTE** prgbSignature, // out 953 UINT32* pulTickCountSize, // out 954 BYTE** prgbTickCount // out 955 ); 956 extern TSS_RESULT Tcsip_TPM_DAA_Join 957 ( 958 TCS_CONTEXT_HANDLE hContext, // in 959 TPM_HANDLE handle, // in 960 BYTE stage, // in 961 UINT32 inputSize0, // in 962 BYTE* inputData0, // in 963 UINT32 inputSize1, // in 964 BYTE* inputData1, // in 965 TPM_AUTH* ownerAuth, // in, out 966 UINT32* outputSize, // out 967 BYTE** outputData // out 968 ); 969 extern TSS_RESULT Tcsip_TPM_DAA_Sign 970 ( 971 TCS_CONTEXT_HANDLE hContext, // in 972 TPM_HANDLE handle, // in 973 BYTE stage, // in 974 UINT32 inputSize0, // in 975 BYTE* inputData0, // in 976 UINT32 inputSize1, // in 977 BYTE* inputData1, // in 978 TPM_AUTH* ownerAuth, // in, out 979 UINT32* outputSize, // out 980 BYTE** outputData // out 981 ); 982 extern TSS_RESULT Tcsip_MigrateKey 983 ( 984 TCS_CONTEXT_HANDLE hContext, // in 985 TCS_KEY_HANDLE hMaKey, // in 986 UINT32 PublicKeySize, // in 987 BYTE* PublicKey, // in 988 UINT32 inDataSize, // in 989 BYTE* inData, // in 990 TPM_AUTH* ownerAuth, // in, out 991 UINT32* outDataSize, // out 992 BYTE** outData // out 993 ); 994 extern TSS_RESULT Tcsip_CMK_SetRestrictions 995 ( 996 TCS_CONTEXT_HANDLE hContext, // in 997 TSS_CMK_DELEGATE Restriction, // in 998 TPM_AUTH* ownerAuth // in, out 999 ); 1000 extern TSS_RESULT Tcsip_CMK_ApproveMA 1001 ( 1002 TCS_CONTEXT_HANDLE hContext, // in 1003 TPM_DIGEST migAuthorityDigest, // in 1004 TPM_AUTH* ownerAuth, // in, out 1005 TPM_HMAC* HmacMigAuthDigest // out 1006 ); 1007 extern TSS_RESULT Tcsip_CMK_CreateKey 1008 ( 1009 TCS_CONTEXT_HANDLE hContext, // in 1010 TCS_KEY_HANDLE hWrappingKey, // in 1011 TPM_ENCAUTH KeyUsageAuth, // in 1012 TPM_HMAC MigAuthApproval, // in 1013 TPM_DIGEST MigAuthorityDigest, // in 1014 UINT32* keyDataSize, // in, out 1015 BYTE** prgbKeyData, // in, out 1016 TPM_AUTH* pAuth // in, out 1017 ); 1018 extern TSS_RESULT Tcsip_CMK_CreateTicket 1019 ( 1020 TCS_CONTEXT_HANDLE hContext, // in 1021 UINT32 PublicVerifyKeySize, // in 1022 BYTE* PublicVerifyKey, // in 1023 TPM_DIGEST SignedData, // in 1024 UINT32 SigValueSize, // in 1025 BYTE* SigValue, // in 1026 TPM_AUTH* pOwnerAuth, // in, out 1027 TPM_HMAC* SigTicket // out 1028 ); 1029 extern TSS_RESULT Tcsip_CMK_CreateBlob 1030 ( 1031 TCS_CONTEXT_HANDLE hContext, // in 1032 TCS_KEY_HANDLE parentHandle, // in 1033 TSS_MIGRATE_SCHEME migrationType, // in 1034 UINT32 MigrationKeyAuthSize, // in 1035 BYTE* MigrationKeyAuth, // in 1036 TPM_DIGEST PubSourceKeyDigest, // in 1037 UINT32 msaListSize, // in 1038 BYTE* msaList, // in 1039 UINT32 restrictTicketSize, // in 1040 BYTE* restrictTicket, // in 1041 UINT32 sigTicketSize, // in 1042 BYTE* sigTicket, // in 1043 UINT32 encDataSize, // in 1044 BYTE* encData, // in 1045 TPM_AUTH* parentAuth, // in, out 1046 UINT32* randomSize, // out 1047 BYTE** random, // out 1048 UINT32* outDataSize, // out 1049 BYTE** outData // out 1050 ); 1051 extern TSS_RESULT Tcsip_CMK_ConvertMigration 1052 ( 1053 TCS_CONTEXT_HANDLE hContext, // in 1054 TCS_KEY_HANDLE parentHandle, // in 1055 TPM_CMK_AUTH restrictTicket, // in 1056 TPM_HMAC sigTicket, // in 1057 UINT32 keyDataSize, // in 1058 BYTE* prgbKeyData, // in 1059 UINT32 msaListSize, // in 1060 BYTE* msaList, // in 1061 UINT32 randomSize, // in 1062 BYTE* random, // in 1063 TPM_AUTH* parentAuth, // in, out 1064 UINT32* outDataSize, // out 1065 BYTE** outData // out 1066 ); 1067 extern TSS_RESULT Tcsip_SetCapability 1068 ( 1069 TCS_CONTEXT_HANDLE hContext, // in 1070 TPM_CAPABILITY_AREA capArea, // in 1071 UINT32 subCapSize, // in 1072 BYTE* subCap, // in 1073 UINT32 valueSize, // in 1074 BYTE* value, // in 1075 TPM_AUTH* ownerAuth // in, out 1076 ); 1077 extern TSS_RESULT Tcsip_GetAuditDigest 1078 ( 1079 TCS_CONTEXT_HANDLE hContext, // in 1080 UINT32 startOrdinal, // in 1081 TPM_DIGEST* auditDigest, // out 1082 UINT32* counterValueSize, // out 1083 BYTE** counterValue, // out 1084 TSS_BOOL* more, // out 1085 UINT32* ordSize, // out 1086 UINT32** ordList // out 1087 ); 1088 extern TSS_RESULT Tcsip_GetAuditDigestSigned 1089 ( 1090 TCS_CONTEXT_HANDLE hContext, // in 1091 TCS_KEY_HANDLE keyHandle, // in 1092 TSS_BOOL closeAudit, // in 1093 TPM_NONCE antiReplay, // in 1094 TPM_AUTH* privAuth, // in, out 1095 UINT32* counterValueSize, // out 1096 BYTE** counterValue, // out 1097 TPM_DIGEST* auditDigest, // out 1098 TPM_DIGEST* ordinalDigest, // out 1099 UINT32* sigSize, // out 1100 BYTE** sig // out 1101 ); 1102 extern TSS_RESULT Tcsip_SetOrdinalAuditStatus 1103 ( 1104 TCS_CONTEXT_HANDLE hContext, // in 1105 UINT32 ordinalToAudit, // in 1106 TSS_BOOL auditState, // in 1107 TPM_AUTH* ownerAuth // in, out 1108 ); 1109 extern TSS_RESULT Tcsi_Admin_TSS_SessionsPerLocality 1110 ( 1111 TCS_CONTEXT_HANDLE hContext, // in 1112 UINT32 ulLocality, // in 1113 UINT32 ulSessions, // in 1114 TPM_AUTH* pOwnerAuth // in, out 1115 ); 1116 extern TSS_RESULT Tcsi_GetCredential 1117 ( 1118 TCS_CONTEXT_HANDLE hContext, // in 1119 UINT32 ulCredentialType, // in 1120 UINT32 ulCredentialAccessMode, // in 1121 UINT32* pulCredentialSize, // out 1122 BYTE** prgbCredentialData // out 1123 ); 1124 1125 #if defined __cplusplus 1126 } // extern "C" 1127 #endif 1128 1129 #endif /* TCS_H */ 1130