1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /******************************************************************************* 3 * Copyright 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG 4 * All rights reserved. 5 *******************************************************************************/ 6 #ifndef TSS2_ESYS_H 7 #define TSS2_ESYS_H 8 9 #include "tss2_tcti.h" 10 #include "tss2_sys.h" 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 typedef uint32_t ESYS_TR; 17 18 #define ESYS_TR_NONE 0xfffU 19 #define ESYS_TR_PASSWORD 0x0ffU 20 #define ESYS_TR_PCR0 0U 21 #define ESYS_TR_PCR1 1U 22 #define ESYS_TR_PCR2 2U 23 #define ESYS_TR_PCR3 3U 24 #define ESYS_TR_PCR4 4U 25 #define ESYS_TR_PCR5 5U 26 #define ESYS_TR_PCR6 6U 27 #define ESYS_TR_PCR7 7U 28 #define ESYS_TR_PCR8 8U 29 #define ESYS_TR_PCR9 9U 30 #define ESYS_TR_PCR10 10U 31 #define ESYS_TR_PCR11 11U 32 #define ESYS_TR_PCR12 12U 33 #define ESYS_TR_PCR13 13U 34 #define ESYS_TR_PCR14 14U 35 #define ESYS_TR_PCR15 15U 36 #define ESYS_TR_PCR16 16U 37 #define ESYS_TR_PCR17 17U 38 #define ESYS_TR_PCR18 18U 39 #define ESYS_TR_PCR19 19U 40 #define ESYS_TR_PCR20 20U 41 #define ESYS_TR_PCR21 21U 42 #define ESYS_TR_PCR22 22U 43 #define ESYS_TR_PCR23 23U 44 #define ESYS_TR_PCR24 24U 45 #define ESYS_TR_PCR25 25U 46 #define ESYS_TR_PCR26 26U 47 #define ESYS_TR_PCR27 27U 48 #define ESYS_TR_PCR28 28U 49 #define ESYS_TR_PCR29 29U 50 #define ESYS_TR_PCR30 30U 51 #define ESYS_TR_PCR31 31U 52 53 /* From TPM_RH_CONSTANTS */ 54 #define ESYS_TR_RH_OWNER 0x101U 55 #define ESYS_TR_RH_NULL 0x107U 56 #define ESYS_TR_RH_LOCKOUT 0x10AU 57 #define ESYS_TR_RH_ENDORSEMENT 0x10BU 58 #define ESYS_TR_RH_PLATFORM 0x10CU 59 #define ESYS_TR_RH_PLATFORM_NV 0x10DU 60 61 #define ESYS_TR_RH_AUTH_FIRST 0x110U 62 #define ESYS_TR_RH_AUTH(x) (ESYS_TR_RH_AUTH_FIRST + (ESYS_TR)(x)) 63 64 #define ESYS_TR_MIN_OBJECT 0x1000U 65 66 typedef struct ESYS_CONTEXT ESYS_CONTEXT; 67 68 /* 69 * TPM 2.0 ESAPI Functions 70 */ 71 72 TSS2_RC 73 Esys_Initialize( 74 ESYS_CONTEXT **esys_context, 75 TSS2_TCTI_CONTEXT *tcti, 76 TSS2_ABI_VERSION *abiVersion); 77 78 void 79 Esys_Finalize( 80 ESYS_CONTEXT **context); 81 82 TSS2_RC 83 Esys_GetTcti( 84 ESYS_CONTEXT *esys_context, 85 TSS2_TCTI_CONTEXT **tcti); 86 87 TSS2_RC 88 Esys_GetPollHandles( 89 ESYS_CONTEXT *esys_context, 90 TSS2_TCTI_POLL_HANDLE **handles, 91 size_t *count); 92 93 TSS2_RC 94 Esys_SetTimeout( 95 ESYS_CONTEXT *esys_context, 96 int32_t timeout); 97 98 TSS2_RC 99 Esys_TR_Serialize( 100 ESYS_CONTEXT *esys_context, 101 ESYS_TR object, 102 uint8_t **buffer, 103 size_t *buffer_size); 104 105 TSS2_RC 106 Esys_TR_Deserialize( 107 ESYS_CONTEXT *esys_context, 108 uint8_t const *buffer, 109 size_t buffer_size, 110 ESYS_TR *esys_handle); 111 112 TSS2_RC 113 Esys_TR_FromTPMPublic_Async( 114 ESYS_CONTEXT *esysContext, 115 TPM2_HANDLE tpm_handle, 116 ESYS_TR optionalSession1, 117 ESYS_TR optionalSession2, 118 ESYS_TR optionalSession3); 119 120 TSS2_RC 121 Esys_TR_FromTPMPublic_Finish( 122 ESYS_CONTEXT *esysContext, 123 ESYS_TR *object); 124 125 TSS2_RC 126 Esys_TR_FromTPMPublic( 127 ESYS_CONTEXT *esysContext, 128 TPM2_HANDLE tpm_handle, 129 ESYS_TR optionalSession1, 130 ESYS_TR optionalSession2, 131 ESYS_TR optionalSession3, 132 ESYS_TR *object); 133 134 TSS2_RC 135 Esys_TR_Close( 136 ESYS_CONTEXT *esys_context, 137 ESYS_TR *rsrc_handle); 138 139 TSS2_RC 140 Esys_TR_SetAuth( 141 ESYS_CONTEXT *esysContext, 142 ESYS_TR handle, 143 TPM2B_AUTH const *authValue); 144 145 TSS2_RC 146 Esys_TR_GetName( 147 ESYS_CONTEXT *esysContext, 148 ESYS_TR handle, 149 TPM2B_NAME **name); 150 151 TSS2_RC 152 Esys_TRSess_GetAttributes( 153 ESYS_CONTEXT *esysContext, 154 ESYS_TR session, 155 TPMA_SESSION *flags); 156 157 TSS2_RC 158 Esys_TRSess_SetAttributes( 159 ESYS_CONTEXT *esysContext, 160 ESYS_TR session, 161 TPMA_SESSION flags, 162 TPMA_SESSION mask); 163 164 TSS2_RC 165 Esys_TRSess_GetNonceTPM( 166 ESYS_CONTEXT *esysContext, 167 ESYS_TR session, 168 TPM2B_NONCE **nonceTPM); 169 170 TSS2_RC 171 Esys_TR_GetTpmHandle( 172 ESYS_CONTEXT *esys_context, 173 ESYS_TR esys_handle, 174 TPM2_HANDLE *tpm_handle); 175 176 TSS2_RC 177 Esys_TRSess_GetAuthRequired( 178 ESYS_CONTEXT *esys_context, 179 ESYS_TR esys_handle, 180 TPMI_YES_NO *auth_needed); 181 182 /* Table 5 - TPM2_Startup Command */ 183 184 TSS2_RC 185 Esys_Startup( 186 ESYS_CONTEXT *esysContext, 187 TPM2_SU startupType); 188 189 TSS2_RC 190 Esys_Startup_Async( 191 ESYS_CONTEXT *esysContext, 192 TPM2_SU startupType); 193 194 TSS2_RC 195 Esys_Startup_Finish( 196 ESYS_CONTEXT *esysContext); 197 198 /* Table 7 - TPM2_Shutdown Command */ 199 200 TSS2_RC 201 Esys_Shutdown( 202 ESYS_CONTEXT *esysContext, 203 ESYS_TR shandle1, 204 ESYS_TR shandle2, 205 ESYS_TR shandle3, 206 TPM2_SU shutdownType); 207 208 TSS2_RC 209 Esys_Shutdown_Async( 210 ESYS_CONTEXT *esysContext, 211 ESYS_TR shandle1, 212 ESYS_TR shandle2, 213 ESYS_TR shandle3, 214 TPM2_SU shutdownType); 215 216 TSS2_RC 217 Esys_Shutdown_Finish( 218 ESYS_CONTEXT *esysContext); 219 220 /* Table 9 - TPM2_SelfTest Command */ 221 222 TSS2_RC 223 Esys_SelfTest( 224 ESYS_CONTEXT *esysContext, 225 ESYS_TR shandle1, 226 ESYS_TR shandle2, 227 ESYS_TR shandle3, 228 TPMI_YES_NO fullTest); 229 230 TSS2_RC 231 Esys_SelfTest_Async( 232 ESYS_CONTEXT *esysContext, 233 ESYS_TR shandle1, 234 ESYS_TR shandle2, 235 ESYS_TR shandle3, 236 TPMI_YES_NO fullTest); 237 238 TSS2_RC 239 Esys_SelfTest_Finish( 240 ESYS_CONTEXT *esysContext); 241 242 /* Table 11 - TPM2_IncrementalSelfTest Command */ 243 244 TSS2_RC 245 Esys_IncrementalSelfTest( 246 ESYS_CONTEXT *esysContext, 247 ESYS_TR shandle1, 248 ESYS_TR shandle2, 249 ESYS_TR shandle3, 250 const TPML_ALG *toTest, 251 TPML_ALG **toDoList); 252 253 TSS2_RC 254 Esys_IncrementalSelfTest_Async( 255 ESYS_CONTEXT *esysContext, 256 ESYS_TR shandle1, 257 ESYS_TR shandle2, 258 ESYS_TR shandle3, 259 const TPML_ALG *toTest); 260 261 TSS2_RC 262 Esys_IncrementalSelfTest_Finish( 263 ESYS_CONTEXT *esysContext, 264 TPML_ALG **toDoList); 265 266 /* Table 13 - TPM2_GetTestResult Command */ 267 268 TSS2_RC 269 Esys_GetTestResult( 270 ESYS_CONTEXT *esysContext, 271 ESYS_TR shandle1, 272 ESYS_TR shandle2, 273 ESYS_TR shandle3, 274 TPM2B_MAX_BUFFER **outData, 275 TPM2_RC *testResult); 276 277 TSS2_RC 278 Esys_GetTestResult_Async( 279 ESYS_CONTEXT *esysContext, 280 ESYS_TR shandle1, 281 ESYS_TR shandle2, 282 ESYS_TR shandle3); 283 284 TSS2_RC 285 Esys_GetTestResult_Finish( 286 ESYS_CONTEXT *esysContext, 287 TPM2B_MAX_BUFFER **outData, 288 TPM2_RC *testResult); 289 290 /* Table 15 - TPM2_StartAuthSession Command */ 291 292 TSS2_RC 293 Esys_StartAuthSession( 294 ESYS_CONTEXT *esysContext, 295 ESYS_TR tpmKey, 296 ESYS_TR bind, 297 ESYS_TR shandle1, 298 ESYS_TR shandle2, 299 ESYS_TR shandle3, 300 const TPM2B_NONCE *nonceCaller, 301 TPM2_SE sessionType, 302 const TPMT_SYM_DEF *symmetric, 303 TPMI_ALG_HASH authHash, 304 ESYS_TR *sessionHandle); 305 306 TSS2_RC 307 Esys_StartAuthSession_Async( 308 ESYS_CONTEXT *esysContext, 309 ESYS_TR tpmKey, 310 ESYS_TR bind, 311 ESYS_TR shandle1, 312 ESYS_TR shandle2, 313 ESYS_TR shandle3, 314 const TPM2B_NONCE *nonceCaller, 315 TPM2_SE sessionType, 316 const TPMT_SYM_DEF *symmetric, 317 TPMI_ALG_HASH authHash); 318 319 TSS2_RC 320 Esys_StartAuthSession_Finish( 321 ESYS_CONTEXT *esysContext, 322 ESYS_TR *sessionHandle); 323 324 /* Table 17 - TPM2_PolicyRestart Command */ 325 326 TSS2_RC 327 Esys_PolicyRestart( 328 ESYS_CONTEXT *esysContext, 329 ESYS_TR sessionHandle, 330 ESYS_TR shandle1, 331 ESYS_TR shandle2, 332 ESYS_TR shandle3); 333 334 TSS2_RC 335 Esys_PolicyRestart_Async( 336 ESYS_CONTEXT *esysContext, 337 ESYS_TR sessionHandle, 338 ESYS_TR shandle1, 339 ESYS_TR shandle2, 340 ESYS_TR shandle3); 341 342 TSS2_RC 343 Esys_PolicyRestart_Finish( 344 ESYS_CONTEXT *esysContext); 345 346 /* Table 19 - TPM2_Create Command */ 347 348 TSS2_RC 349 Esys_Create( 350 ESYS_CONTEXT *esysContext, 351 ESYS_TR parentHandle, 352 ESYS_TR shandle1, 353 ESYS_TR shandle2, 354 ESYS_TR shandle3, 355 const TPM2B_SENSITIVE_CREATE *inSensitive, 356 const TPM2B_PUBLIC *inPublic, 357 const TPM2B_DATA *outsideInfo, 358 const TPML_PCR_SELECTION *creationPCR, 359 TPM2B_PRIVATE **outPrivate, 360 TPM2B_PUBLIC **outPublic, 361 TPM2B_CREATION_DATA **creationData, 362 TPM2B_DIGEST **creationHash, 363 TPMT_TK_CREATION **creationTicket); 364 365 TSS2_RC 366 Esys_Create_Async( 367 ESYS_CONTEXT *esysContext, 368 ESYS_TR parentHandle, 369 ESYS_TR shandle1, 370 ESYS_TR shandle2, 371 ESYS_TR shandle3, 372 const TPM2B_SENSITIVE_CREATE *inSensitive, 373 const TPM2B_PUBLIC *inPublic, 374 const TPM2B_DATA *outsideInfo, 375 const TPML_PCR_SELECTION *creationPCR); 376 377 TSS2_RC 378 Esys_Create_Finish( 379 ESYS_CONTEXT *esysContext, 380 TPM2B_PRIVATE **outPrivate, 381 TPM2B_PUBLIC **outPublic, 382 TPM2B_CREATION_DATA **creationData, 383 TPM2B_DIGEST **creationHash, 384 TPMT_TK_CREATION **creationTicket); 385 386 /* Table 21 - TPM2_Load Command */ 387 388 TSS2_RC 389 Esys_Load( 390 ESYS_CONTEXT *esysContext, 391 ESYS_TR parentHandle, 392 ESYS_TR shandle1, 393 ESYS_TR shandle2, 394 ESYS_TR shandle3, 395 const TPM2B_PRIVATE *inPrivate, 396 const TPM2B_PUBLIC *inPublic, 397 ESYS_TR *objectHandle); 398 399 TSS2_RC 400 Esys_Load_Async( 401 ESYS_CONTEXT *esysContext, 402 ESYS_TR parentHandle, 403 ESYS_TR shandle1, 404 ESYS_TR shandle2, 405 ESYS_TR shandle3, 406 const TPM2B_PRIVATE *inPrivate, 407 const TPM2B_PUBLIC *inPublic); 408 409 TSS2_RC 410 Esys_Load_Finish( 411 ESYS_CONTEXT *esysContext, 412 ESYS_TR *objectHandle); 413 414 /* Table 23 - TPM2_LoadExternal Command */ 415 416 TSS2_RC 417 Esys_LoadExternal( 418 ESYS_CONTEXT *esysContext, 419 ESYS_TR shandle1, 420 ESYS_TR shandle2, 421 ESYS_TR shandle3, 422 const TPM2B_SENSITIVE *inPrivate, 423 const TPM2B_PUBLIC *inPublic, 424 TPMI_RH_HIERARCHY hierarchy, 425 ESYS_TR *objectHandle); 426 427 TSS2_RC 428 Esys_LoadExternal_Async( 429 ESYS_CONTEXT *esysContext, 430 ESYS_TR shandle1, 431 ESYS_TR shandle2, 432 ESYS_TR shandle3, 433 const TPM2B_SENSITIVE *inPrivate, 434 const TPM2B_PUBLIC *inPublic, 435 TPMI_RH_HIERARCHY hierarchy); 436 437 TSS2_RC 438 Esys_LoadExternal_Finish( 439 ESYS_CONTEXT *esysContext, 440 ESYS_TR *objectHandle); 441 442 /* Table 25 - TPM2_ReadPublic Command */ 443 444 TSS2_RC 445 Esys_ReadPublic( 446 ESYS_CONTEXT *esysContext, 447 ESYS_TR objectHandle, 448 ESYS_TR shandle1, 449 ESYS_TR shandle2, 450 ESYS_TR shandle3, 451 TPM2B_PUBLIC **outPublic, 452 TPM2B_NAME **name, 453 TPM2B_NAME **qualifiedName); 454 455 TSS2_RC 456 Esys_ReadPublic_Async( 457 ESYS_CONTEXT *esysContext, 458 ESYS_TR objectHandle, 459 ESYS_TR shandle1, 460 ESYS_TR shandle2, 461 ESYS_TR shandle3); 462 463 TSS2_RC 464 Esys_ReadPublic_Finish( 465 ESYS_CONTEXT *esysContext, 466 TPM2B_PUBLIC **outPublic, 467 TPM2B_NAME **name, 468 TPM2B_NAME **qualifiedName); 469 470 /* Table 27 - TPM2_ActivateCredential Command */ 471 472 TSS2_RC 473 Esys_ActivateCredential( 474 ESYS_CONTEXT *esysContext, 475 ESYS_TR activateHandle, 476 ESYS_TR keyHandle, 477 ESYS_TR shandle1, 478 ESYS_TR shandle2, 479 ESYS_TR shandle3, 480 const TPM2B_ID_OBJECT *credentialBlob, 481 const TPM2B_ENCRYPTED_SECRET *secret, 482 TPM2B_DIGEST **certInfo); 483 484 TSS2_RC 485 Esys_ActivateCredential_Async( 486 ESYS_CONTEXT *esysContext, 487 ESYS_TR activateHandle, 488 ESYS_TR keyHandle, 489 ESYS_TR shandle1, 490 ESYS_TR shandle2, 491 ESYS_TR shandle3, 492 const TPM2B_ID_OBJECT *credentialBlob, 493 const TPM2B_ENCRYPTED_SECRET *secret); 494 495 TSS2_RC 496 Esys_ActivateCredential_Finish( 497 ESYS_CONTEXT *esysContext, 498 TPM2B_DIGEST **certInfo); 499 500 /* Table 29 - TPM2_MakeCredential Command */ 501 502 TSS2_RC 503 Esys_MakeCredential( 504 ESYS_CONTEXT *esysContext, 505 ESYS_TR handle, 506 ESYS_TR shandle1, 507 ESYS_TR shandle2, 508 ESYS_TR shandle3, 509 const TPM2B_DIGEST *credential, 510 const TPM2B_NAME *objectName, 511 TPM2B_ID_OBJECT **credentialBlob, 512 TPM2B_ENCRYPTED_SECRET **secret); 513 514 TSS2_RC 515 Esys_MakeCredential_Async( 516 ESYS_CONTEXT *esysContext, 517 ESYS_TR handle, 518 ESYS_TR shandle1, 519 ESYS_TR shandle2, 520 ESYS_TR shandle3, 521 const TPM2B_DIGEST *credential, 522 const TPM2B_NAME *objectName); 523 524 TSS2_RC 525 Esys_MakeCredential_Finish( 526 ESYS_CONTEXT *esysContext, 527 TPM2B_ID_OBJECT **credentialBlob, 528 TPM2B_ENCRYPTED_SECRET **secret); 529 530 /* Table 31 - TPM2_Unseal Command */ 531 532 TSS2_RC 533 Esys_Unseal( 534 ESYS_CONTEXT *esysContext, 535 ESYS_TR itemHandle, 536 ESYS_TR shandle1, 537 ESYS_TR shandle2, 538 ESYS_TR shandle3, 539 TPM2B_SENSITIVE_DATA **outData); 540 541 TSS2_RC 542 Esys_Unseal_Async( 543 ESYS_CONTEXT *esysContext, 544 ESYS_TR itemHandle, 545 ESYS_TR shandle1, 546 ESYS_TR shandle2, 547 ESYS_TR shandle3); 548 549 TSS2_RC 550 Esys_Unseal_Finish( 551 ESYS_CONTEXT *esysContext, 552 TPM2B_SENSITIVE_DATA **outData); 553 554 /* Table 33 - TPM2_ObjectChangeAuth Command */ 555 556 TSS2_RC 557 Esys_ObjectChangeAuth( 558 ESYS_CONTEXT *esysContext, 559 ESYS_TR objectHandle, 560 ESYS_TR parentHandle, 561 ESYS_TR shandle1, 562 ESYS_TR shandle2, 563 ESYS_TR shandle3, 564 const TPM2B_AUTH *newAuth, 565 TPM2B_PRIVATE **outPrivate); 566 567 TSS2_RC 568 Esys_ObjectChangeAuth_Async( 569 ESYS_CONTEXT *esysContext, 570 ESYS_TR objectHandle, 571 ESYS_TR parentHandle, 572 ESYS_TR shandle1, 573 ESYS_TR shandle2, 574 ESYS_TR shandle3, 575 const TPM2B_AUTH *newAuth); 576 577 TSS2_RC 578 Esys_ObjectChangeAuth_Finish( 579 ESYS_CONTEXT *esysContext, 580 TPM2B_PRIVATE **outPrivate); 581 582 /* Table 35 - TPM2_CreateLoaded Command */ 583 584 TSS2_RC 585 Esys_CreateLoaded( 586 ESYS_CONTEXT *esysContext, 587 ESYS_TR parentHandle, 588 ESYS_TR shandle1, 589 ESYS_TR shandle2, 590 ESYS_TR shandle3, 591 const TPM2B_SENSITIVE_CREATE *inSensitive, 592 const TPM2B_TEMPLATE *inPublic, 593 ESYS_TR *objectHandle, 594 TPM2B_PRIVATE **outPrivate, 595 TPM2B_PUBLIC **outPublic); 596 597 TSS2_RC 598 Esys_CreateLoaded_Async( 599 ESYS_CONTEXT *esysContext, 600 ESYS_TR parentHandle, 601 ESYS_TR shandle1, 602 ESYS_TR shandle2, 603 ESYS_TR shandle3, 604 const TPM2B_SENSITIVE_CREATE *inSensitive, 605 const TPM2B_TEMPLATE *inPublic); 606 607 TSS2_RC 608 Esys_CreateLoaded_Finish( 609 ESYS_CONTEXT *esysContext, 610 ESYS_TR *objectHandle, 611 TPM2B_PRIVATE **outPrivate, 612 TPM2B_PUBLIC **outPublic); 613 614 /* Table 37 - TPM2_Duplicate Command */ 615 616 TSS2_RC 617 Esys_Duplicate( 618 ESYS_CONTEXT *esysContext, 619 ESYS_TR objectHandle, 620 ESYS_TR newParentHandle, 621 ESYS_TR shandle1, 622 ESYS_TR shandle2, 623 ESYS_TR shandle3, 624 const TPM2B_DATA *encryptionKeyIn, 625 const TPMT_SYM_DEF_OBJECT *symmetricAlg, 626 TPM2B_DATA **encryptionKeyOut, 627 TPM2B_PRIVATE **duplicate, 628 TPM2B_ENCRYPTED_SECRET **outSymSeed); 629 630 TSS2_RC 631 Esys_Duplicate_Async( 632 ESYS_CONTEXT *esysContext, 633 ESYS_TR objectHandle, 634 ESYS_TR newParentHandle, 635 ESYS_TR shandle1, 636 ESYS_TR shandle2, 637 ESYS_TR shandle3, 638 const TPM2B_DATA *encryptionKeyIn, 639 const TPMT_SYM_DEF_OBJECT *symmetricAlg); 640 641 TSS2_RC 642 Esys_Duplicate_Finish( 643 ESYS_CONTEXT *esysContext, 644 TPM2B_DATA **encryptionKeyOut, 645 TPM2B_PRIVATE **duplicate, 646 TPM2B_ENCRYPTED_SECRET **outSymSeed); 647 648 /* Table 39 - TPM2_Rewrap Command */ 649 650 TSS2_RC 651 Esys_Rewrap( 652 ESYS_CONTEXT *esysContext, 653 ESYS_TR oldParent, 654 ESYS_TR newParent, 655 ESYS_TR shandle1, 656 ESYS_TR shandle2, 657 ESYS_TR shandle3, 658 const TPM2B_PRIVATE *inDuplicate, 659 const TPM2B_NAME *name, 660 const TPM2B_ENCRYPTED_SECRET *inSymSeed, 661 TPM2B_PRIVATE **outDuplicate, 662 TPM2B_ENCRYPTED_SECRET **outSymSeed); 663 664 TSS2_RC 665 Esys_Rewrap_Async( 666 ESYS_CONTEXT *esysContext, 667 ESYS_TR oldParent, 668 ESYS_TR newParent, 669 ESYS_TR shandle1, 670 ESYS_TR shandle2, 671 ESYS_TR shandle3, 672 const TPM2B_PRIVATE *inDuplicate, 673 const TPM2B_NAME *name, 674 const TPM2B_ENCRYPTED_SECRET *inSymSeed); 675 676 TSS2_RC 677 Esys_Rewrap_Finish( 678 ESYS_CONTEXT *esysContext, 679 TPM2B_PRIVATE **outDuplicate, 680 TPM2B_ENCRYPTED_SECRET **outSymSeed); 681 682 /* Table 41 - TPM2_Import Command */ 683 684 TSS2_RC 685 Esys_Import( 686 ESYS_CONTEXT *esysContext, 687 ESYS_TR parentHandle, 688 ESYS_TR shandle1, 689 ESYS_TR shandle2, 690 ESYS_TR shandle3, 691 const TPM2B_DATA *encryptionKey, 692 const TPM2B_PUBLIC *objectPublic, 693 const TPM2B_PRIVATE *duplicate, 694 const TPM2B_ENCRYPTED_SECRET *inSymSeed, 695 const TPMT_SYM_DEF_OBJECT *symmetricAlg, 696 TPM2B_PRIVATE **outPrivate); 697 698 TSS2_RC 699 Esys_Import_Async( 700 ESYS_CONTEXT *esysContext, 701 ESYS_TR parentHandle, 702 ESYS_TR shandle1, 703 ESYS_TR shandle2, 704 ESYS_TR shandle3, 705 const TPM2B_DATA *encryptionKey, 706 const TPM2B_PUBLIC *objectPublic, 707 const TPM2B_PRIVATE *duplicate, 708 const TPM2B_ENCRYPTED_SECRET *inSymSeed, 709 const TPMT_SYM_DEF_OBJECT *symmetricAlg); 710 711 TSS2_RC 712 Esys_Import_Finish( 713 ESYS_CONTEXT *esysContext, 714 TPM2B_PRIVATE **outPrivate); 715 716 /* Table 45 - TPM2_RSA_Encrypt Command */ 717 718 TSS2_RC 719 Esys_RSA_Encrypt( 720 ESYS_CONTEXT *esysContext, 721 ESYS_TR keyHandle, 722 ESYS_TR shandle1, 723 ESYS_TR shandle2, 724 ESYS_TR shandle3, 725 const TPM2B_PUBLIC_KEY_RSA *message, 726 const TPMT_RSA_DECRYPT *inScheme, 727 const TPM2B_DATA *label, 728 TPM2B_PUBLIC_KEY_RSA **outData); 729 730 TSS2_RC 731 Esys_RSA_Encrypt_Async( 732 ESYS_CONTEXT *esysContext, 733 ESYS_TR keyHandle, 734 ESYS_TR shandle1, 735 ESYS_TR shandle2, 736 ESYS_TR shandle3, 737 const TPM2B_PUBLIC_KEY_RSA *message, 738 const TPMT_RSA_DECRYPT *inScheme, 739 const TPM2B_DATA *label); 740 741 TSS2_RC 742 Esys_RSA_Encrypt_Finish( 743 ESYS_CONTEXT *esysContext, 744 TPM2B_PUBLIC_KEY_RSA **outData); 745 746 /* Table 47 - TPM2_RSA_Decrypt Command */ 747 748 TSS2_RC 749 Esys_RSA_Decrypt( 750 ESYS_CONTEXT *esysContext, 751 ESYS_TR keyHandle, 752 ESYS_TR shandle1, 753 ESYS_TR shandle2, 754 ESYS_TR shandle3, 755 const TPM2B_PUBLIC_KEY_RSA *cipherText, 756 const TPMT_RSA_DECRYPT *inScheme, 757 const TPM2B_DATA *label, 758 TPM2B_PUBLIC_KEY_RSA **message); 759 760 TSS2_RC 761 Esys_RSA_Decrypt_Async( 762 ESYS_CONTEXT *esysContext, 763 ESYS_TR keyHandle, 764 ESYS_TR shandle1, 765 ESYS_TR shandle2, 766 ESYS_TR shandle3, 767 const TPM2B_PUBLIC_KEY_RSA *cipherText, 768 const TPMT_RSA_DECRYPT *inScheme, 769 const TPM2B_DATA *label); 770 771 TSS2_RC 772 Esys_RSA_Decrypt_Finish( 773 ESYS_CONTEXT *esysContext, 774 TPM2B_PUBLIC_KEY_RSA **message); 775 776 /* Table 49 - TPM2_ECDH_KeyGen Command */ 777 778 TSS2_RC 779 Esys_ECDH_KeyGen( 780 ESYS_CONTEXT *esysContext, 781 ESYS_TR keyHandle, 782 ESYS_TR shandle1, 783 ESYS_TR shandle2, 784 ESYS_TR shandle3, 785 TPM2B_ECC_POINT **zPoint, 786 TPM2B_ECC_POINT **pubPoint); 787 788 TSS2_RC 789 Esys_ECDH_KeyGen_Async( 790 ESYS_CONTEXT *esysContext, 791 ESYS_TR keyHandle, 792 ESYS_TR shandle1, 793 ESYS_TR shandle2, 794 ESYS_TR shandle3); 795 796 TSS2_RC 797 Esys_ECDH_KeyGen_Finish( 798 ESYS_CONTEXT *esysContext, 799 TPM2B_ECC_POINT **zPoint, 800 TPM2B_ECC_POINT **pubPoint); 801 802 /* Table 51 - TPM2_ECDH_ZGen Command */ 803 804 TSS2_RC 805 Esys_ECDH_ZGen( 806 ESYS_CONTEXT *esysContext, 807 ESYS_TR keyHandle, 808 ESYS_TR shandle1, 809 ESYS_TR shandle2, 810 ESYS_TR shandle3, 811 const TPM2B_ECC_POINT *inPoint, 812 TPM2B_ECC_POINT **outPoint); 813 814 TSS2_RC 815 Esys_ECDH_ZGen_Async( 816 ESYS_CONTEXT *esysContext, 817 ESYS_TR keyHandle, 818 ESYS_TR shandle1, 819 ESYS_TR shandle2, 820 ESYS_TR shandle3, 821 const TPM2B_ECC_POINT *inPoint); 822 823 TSS2_RC 824 Esys_ECDH_ZGen_Finish( 825 ESYS_CONTEXT *esysContext, 826 TPM2B_ECC_POINT **outPoint); 827 828 /* Table 53 - TPM2_ECC_Parameters Command */ 829 830 TSS2_RC 831 Esys_ECC_Parameters( 832 ESYS_CONTEXT *esysContext, 833 ESYS_TR shandle1, 834 ESYS_TR shandle2, 835 ESYS_TR shandle3, 836 TPMI_ECC_CURVE curveID, 837 TPMS_ALGORITHM_DETAIL_ECC **parameters); 838 839 TSS2_RC 840 Esys_ECC_Parameters_Async( 841 ESYS_CONTEXT *esysContext, 842 ESYS_TR shandle1, 843 ESYS_TR shandle2, 844 ESYS_TR shandle3, 845 TPMI_ECC_CURVE curveID); 846 847 TSS2_RC 848 Esys_ECC_Parameters_Finish( 849 ESYS_CONTEXT *esysContext, 850 TPMS_ALGORITHM_DETAIL_ECC **parameters); 851 852 /* Table 55 - TPM2_ZGen_2Phase Command */ 853 854 TSS2_RC 855 Esys_ZGen_2Phase( 856 ESYS_CONTEXT *esysContext, 857 ESYS_TR keyA, 858 ESYS_TR shandle1, 859 ESYS_TR shandle2, 860 ESYS_TR shandle3, 861 const TPM2B_ECC_POINT *inQsB, 862 const TPM2B_ECC_POINT *inQeB, 863 TPMI_ECC_KEY_EXCHANGE inScheme, 864 UINT16 counter, 865 TPM2B_ECC_POINT **outZ1, 866 TPM2B_ECC_POINT **outZ2); 867 868 TSS2_RC 869 Esys_ZGen_2Phase_Async( 870 ESYS_CONTEXT *esysContext, 871 ESYS_TR keyA, 872 ESYS_TR shandle1, 873 ESYS_TR shandle2, 874 ESYS_TR shandle3, 875 const TPM2B_ECC_POINT *inQsB, 876 const TPM2B_ECC_POINT *inQeB, 877 TPMI_ECC_KEY_EXCHANGE inScheme, 878 UINT16 counter); 879 880 TSS2_RC 881 Esys_ZGen_2Phase_Finish( 882 ESYS_CONTEXT *esysContext, 883 TPM2B_ECC_POINT **outZ1, 884 TPM2B_ECC_POINT **outZ2); 885 886 /* Table 58 - TPM2_EncryptDecrypt Command */ 887 888 TSS2_RC 889 Esys_EncryptDecrypt( 890 ESYS_CONTEXT *esysContext, 891 ESYS_TR keyHandle, 892 ESYS_TR shandle1, 893 ESYS_TR shandle2, 894 ESYS_TR shandle3, 895 TPMI_YES_NO decrypt, 896 TPMI_ALG_SYM_MODE mode, 897 const TPM2B_IV *ivIn, 898 const TPM2B_MAX_BUFFER *inData, 899 TPM2B_MAX_BUFFER **outData, 900 TPM2B_IV **ivOut); 901 902 TSS2_RC 903 Esys_EncryptDecrypt_Async( 904 ESYS_CONTEXT *esysContext, 905 ESYS_TR keyHandle, 906 ESYS_TR shandle1, 907 ESYS_TR shandle2, 908 ESYS_TR shandle3, 909 TPMI_YES_NO decrypt, 910 TPMI_ALG_SYM_MODE mode, 911 const TPM2B_IV *ivIn, 912 const TPM2B_MAX_BUFFER *inData); 913 914 TSS2_RC 915 Esys_EncryptDecrypt_Finish( 916 ESYS_CONTEXT *esysContext, 917 TPM2B_MAX_BUFFER **outData, 918 TPM2B_IV **ivOut); 919 920 /* Table 60 - TPM2_EncryptDecrypt2 Command */ 921 922 TSS2_RC 923 Esys_EncryptDecrypt2( 924 ESYS_CONTEXT *esysContext, 925 ESYS_TR keyHandle, 926 ESYS_TR shandle1, 927 ESYS_TR shandle2, 928 ESYS_TR shandle3, 929 const TPM2B_MAX_BUFFER *inData, 930 TPMI_YES_NO decrypt, 931 TPMI_ALG_SYM_MODE mode, 932 const TPM2B_IV *ivIn, 933 TPM2B_MAX_BUFFER **outData, 934 TPM2B_IV **ivOut); 935 936 TSS2_RC 937 Esys_EncryptDecrypt2_Async( 938 ESYS_CONTEXT *esysContext, 939 ESYS_TR keyHandle, 940 ESYS_TR shandle1, 941 ESYS_TR shandle2, 942 ESYS_TR shandle3, 943 const TPM2B_MAX_BUFFER *inData, 944 TPMI_YES_NO decrypt, 945 TPMI_ALG_SYM_MODE mode, 946 const TPM2B_IV *ivIn); 947 948 TSS2_RC 949 Esys_EncryptDecrypt2_Finish( 950 ESYS_CONTEXT *esysContext, 951 TPM2B_MAX_BUFFER **outData, 952 TPM2B_IV **ivOut); 953 954 /* Table 62 - TPM2_Hash Command */ 955 956 TSS2_RC 957 Esys_Hash( 958 ESYS_CONTEXT *esysContext, 959 ESYS_TR shandle1, 960 ESYS_TR shandle2, 961 ESYS_TR shandle3, 962 const TPM2B_MAX_BUFFER *data, 963 TPMI_ALG_HASH hashAlg, 964 TPMI_RH_HIERARCHY hierarchy, 965 TPM2B_DIGEST **outHash, 966 TPMT_TK_HASHCHECK **validation); 967 968 TSS2_RC 969 Esys_Hash_Async( 970 ESYS_CONTEXT *esysContext, 971 ESYS_TR shandle1, 972 ESYS_TR shandle2, 973 ESYS_TR shandle3, 974 const TPM2B_MAX_BUFFER *data, 975 TPMI_ALG_HASH hashAlg, 976 TPMI_RH_HIERARCHY hierarchy); 977 978 TSS2_RC 979 Esys_Hash_Finish( 980 ESYS_CONTEXT *esysContext, 981 TPM2B_DIGEST **outHash, 982 TPMT_TK_HASHCHECK **validation); 983 984 /* Table 64 - TPM2_HMAC Command */ 985 986 TSS2_RC 987 Esys_HMAC( 988 ESYS_CONTEXT *esysContext, 989 ESYS_TR handle, 990 ESYS_TR shandle1, 991 ESYS_TR shandle2, 992 ESYS_TR shandle3, 993 const TPM2B_MAX_BUFFER *buffer, 994 TPMI_ALG_HASH hashAlg, 995 TPM2B_DIGEST **outHMAC); 996 997 TSS2_RC 998 Esys_HMAC_Async( 999 ESYS_CONTEXT *esysContext, 1000 ESYS_TR handle, 1001 ESYS_TR shandle1, 1002 ESYS_TR shandle2, 1003 ESYS_TR shandle3, 1004 const TPM2B_MAX_BUFFER *buffer, 1005 TPMI_ALG_HASH hashAlg); 1006 1007 TSS2_RC 1008 Esys_HMAC_Finish( 1009 ESYS_CONTEXT *esysContext, 1010 TPM2B_DIGEST **outHMAC); 1011 1012 /* Table 66 - TPM2_GetRandom Command */ 1013 1014 TSS2_RC 1015 Esys_GetRandom( 1016 ESYS_CONTEXT *esysContext, 1017 ESYS_TR shandle1, 1018 ESYS_TR shandle2, 1019 ESYS_TR shandle3, 1020 UINT16 bytesRequested, 1021 TPM2B_DIGEST **randomBytes); 1022 1023 TSS2_RC 1024 Esys_GetRandom_Async( 1025 ESYS_CONTEXT *esysContext, 1026 ESYS_TR shandle1, 1027 ESYS_TR shandle2, 1028 ESYS_TR shandle3, 1029 UINT16 bytesRequested); 1030 1031 TSS2_RC 1032 Esys_GetRandom_Finish( 1033 ESYS_CONTEXT *esysContext, 1034 TPM2B_DIGEST **randomBytes); 1035 1036 /* Table 68 - TPM2_StirRandom Command */ 1037 1038 TSS2_RC 1039 Esys_StirRandom( 1040 ESYS_CONTEXT *esysContext, 1041 ESYS_TR shandle1, 1042 ESYS_TR shandle2, 1043 ESYS_TR shandle3, 1044 const TPM2B_SENSITIVE_DATA *inData); 1045 1046 TSS2_RC 1047 Esys_StirRandom_Async( 1048 ESYS_CONTEXT *esysContext, 1049 ESYS_TR shandle1, 1050 ESYS_TR shandle2, 1051 ESYS_TR shandle3, 1052 const TPM2B_SENSITIVE_DATA *inData); 1053 1054 TSS2_RC 1055 Esys_StirRandom_Finish( 1056 ESYS_CONTEXT *esysContext); 1057 1058 /* Table 71 - TPM2_HMAC_Start Command */ 1059 1060 TSS2_RC 1061 Esys_HMAC_Start( 1062 ESYS_CONTEXT *esysContext, 1063 ESYS_TR handle, 1064 ESYS_TR shandle1, 1065 ESYS_TR shandle2, 1066 ESYS_TR shandle3, 1067 const TPM2B_AUTH *auth, 1068 TPMI_ALG_HASH hashAlg, 1069 ESYS_TR *sequenceHandle); 1070 1071 TSS2_RC 1072 Esys_HMAC_Start_Async( 1073 ESYS_CONTEXT *esysContext, 1074 ESYS_TR handle, 1075 ESYS_TR shandle1, 1076 ESYS_TR shandle2, 1077 ESYS_TR shandle3, 1078 const TPM2B_AUTH *auth, 1079 TPMI_ALG_HASH hashAlg); 1080 1081 TSS2_RC 1082 Esys_HMAC_Start_Finish( 1083 ESYS_CONTEXT *esysContext, 1084 ESYS_TR *sequenceHandle); 1085 1086 /* Table 73 - TPM2_HashSequenceStart Command */ 1087 1088 TSS2_RC 1089 Esys_HashSequenceStart( 1090 ESYS_CONTEXT *esysContext, 1091 ESYS_TR shandle1, 1092 ESYS_TR shandle2, 1093 ESYS_TR shandle3, 1094 const TPM2B_AUTH *auth, 1095 TPMI_ALG_HASH hashAlg, 1096 ESYS_TR *sequenceHandle); 1097 1098 TSS2_RC 1099 Esys_HashSequenceStart_Async( 1100 ESYS_CONTEXT *esysContext, 1101 ESYS_TR shandle1, 1102 ESYS_TR shandle2, 1103 ESYS_TR shandle3, 1104 const TPM2B_AUTH *auth, 1105 TPMI_ALG_HASH hashAlg); 1106 1107 TSS2_RC 1108 Esys_HashSequenceStart_Finish( 1109 ESYS_CONTEXT *esysContext, 1110 ESYS_TR *sequenceHandle); 1111 1112 /* Table 75 - TPM2_SequenceUpdate Command */ 1113 1114 TSS2_RC 1115 Esys_SequenceUpdate( 1116 ESYS_CONTEXT *esysContext, 1117 ESYS_TR sequenceHandle, 1118 ESYS_TR shandle1, 1119 ESYS_TR shandle2, 1120 ESYS_TR shandle3, 1121 const TPM2B_MAX_BUFFER *buffer); 1122 1123 TSS2_RC 1124 Esys_SequenceUpdate_Async( 1125 ESYS_CONTEXT *esysContext, 1126 ESYS_TR sequenceHandle, 1127 ESYS_TR shandle1, 1128 ESYS_TR shandle2, 1129 ESYS_TR shandle3, 1130 const TPM2B_MAX_BUFFER *buffer); 1131 1132 TSS2_RC 1133 Esys_SequenceUpdate_Finish( 1134 ESYS_CONTEXT *esysContext); 1135 1136 /* Table 77 - TPM2_SequenceComplete Command */ 1137 1138 TSS2_RC 1139 Esys_SequenceComplete( 1140 ESYS_CONTEXT *esysContext, 1141 ESYS_TR sequenceHandle, 1142 ESYS_TR shandle1, 1143 ESYS_TR shandle2, 1144 ESYS_TR shandle3, 1145 const TPM2B_MAX_BUFFER *buffer, 1146 TPMI_RH_HIERARCHY hierarchy, 1147 TPM2B_DIGEST **result, 1148 TPMT_TK_HASHCHECK **validation); 1149 1150 TSS2_RC 1151 Esys_SequenceComplete_Async( 1152 ESYS_CONTEXT *esysContext, 1153 ESYS_TR sequenceHandle, 1154 ESYS_TR shandle1, 1155 ESYS_TR shandle2, 1156 ESYS_TR shandle3, 1157 const TPM2B_MAX_BUFFER *buffer, 1158 TPMI_RH_HIERARCHY hierarchy); 1159 1160 TSS2_RC 1161 Esys_SequenceComplete_Finish( 1162 ESYS_CONTEXT *esysContext, 1163 TPM2B_DIGEST **result, 1164 TPMT_TK_HASHCHECK **validation); 1165 1166 /* Table 79 - TPM2_EventSequenceComplete Command */ 1167 1168 TSS2_RC 1169 Esys_EventSequenceComplete( 1170 ESYS_CONTEXT *esysContext, 1171 ESYS_TR pcrHandle, 1172 ESYS_TR sequenceHandle, 1173 ESYS_TR shandle1, 1174 ESYS_TR shandle2, 1175 ESYS_TR shandle3, 1176 const TPM2B_MAX_BUFFER *buffer, 1177 TPML_DIGEST_VALUES **results); 1178 1179 TSS2_RC 1180 Esys_EventSequenceComplete_Async( 1181 ESYS_CONTEXT *esysContext, 1182 ESYS_TR pcrHandle, 1183 ESYS_TR sequenceHandle, 1184 ESYS_TR shandle1, 1185 ESYS_TR shandle2, 1186 ESYS_TR shandle3, 1187 const TPM2B_MAX_BUFFER *buffer); 1188 1189 TSS2_RC 1190 Esys_EventSequenceComplete_Finish( 1191 ESYS_CONTEXT *esysContext, 1192 TPML_DIGEST_VALUES **results); 1193 1194 /* Table 81 - TPM2_Certify Command */ 1195 1196 TSS2_RC 1197 Esys_Certify( 1198 ESYS_CONTEXT *esysContext, 1199 ESYS_TR objectHandle, 1200 ESYS_TR signHandle, 1201 ESYS_TR shandle1, 1202 ESYS_TR shandle2, 1203 ESYS_TR shandle3, 1204 const TPM2B_DATA *qualifyingData, 1205 const TPMT_SIG_SCHEME *inScheme, 1206 TPM2B_ATTEST **certifyInfo, 1207 TPMT_SIGNATURE **signature); 1208 1209 TSS2_RC 1210 Esys_Certify_Async( 1211 ESYS_CONTEXT *esysContext, 1212 ESYS_TR objectHandle, 1213 ESYS_TR signHandle, 1214 ESYS_TR shandle1, 1215 ESYS_TR shandle2, 1216 ESYS_TR shandle3, 1217 const TPM2B_DATA *qualifyingData, 1218 const TPMT_SIG_SCHEME *inScheme); 1219 1220 TSS2_RC 1221 Esys_Certify_Finish( 1222 ESYS_CONTEXT *esysContext, 1223 TPM2B_ATTEST **certifyInfo, 1224 TPMT_SIGNATURE **signature); 1225 1226 /* Table 83 - TPM2_CertifyCreation Command */ 1227 1228 TSS2_RC 1229 Esys_CertifyCreation( 1230 ESYS_CONTEXT *esysContext, 1231 ESYS_TR signHandle, 1232 ESYS_TR objectHandle, 1233 ESYS_TR shandle1, 1234 ESYS_TR shandle2, 1235 ESYS_TR shandle3, 1236 const TPM2B_DATA *qualifyingData, 1237 const TPM2B_DIGEST *creationHash, 1238 const TPMT_SIG_SCHEME *inScheme, 1239 const TPMT_TK_CREATION *creationTicket, 1240 TPM2B_ATTEST **certifyInfo, 1241 TPMT_SIGNATURE **signature); 1242 1243 TSS2_RC 1244 Esys_CertifyCreation_Async( 1245 ESYS_CONTEXT *esysContext, 1246 ESYS_TR signHandle, 1247 ESYS_TR objectHandle, 1248 ESYS_TR shandle1, 1249 ESYS_TR shandle2, 1250 ESYS_TR shandle3, 1251 const TPM2B_DATA *qualifyingData, 1252 const TPM2B_DIGEST *creationHash, 1253 const TPMT_SIG_SCHEME *inScheme, 1254 const TPMT_TK_CREATION *creationTicket); 1255 1256 TSS2_RC 1257 Esys_CertifyCreation_Finish( 1258 ESYS_CONTEXT *esysContext, 1259 TPM2B_ATTEST **certifyInfo, 1260 TPMT_SIGNATURE **signature); 1261 1262 /* Table 85 - TPM2_Quote Command */ 1263 1264 TSS2_RC 1265 Esys_Quote( 1266 ESYS_CONTEXT *esysContext, 1267 ESYS_TR signHandle, 1268 ESYS_TR shandle1, 1269 ESYS_TR shandle2, 1270 ESYS_TR shandle3, 1271 const TPM2B_DATA *qualifyingData, 1272 const TPMT_SIG_SCHEME *inScheme, 1273 const TPML_PCR_SELECTION *PCRselect, 1274 TPM2B_ATTEST **quoted, 1275 TPMT_SIGNATURE **signature); 1276 1277 TSS2_RC 1278 Esys_Quote_Async( 1279 ESYS_CONTEXT *esysContext, 1280 ESYS_TR signHandle, 1281 ESYS_TR shandle1, 1282 ESYS_TR shandle2, 1283 ESYS_TR shandle3, 1284 const TPM2B_DATA *qualifyingData, 1285 const TPMT_SIG_SCHEME *inScheme, 1286 const TPML_PCR_SELECTION *PCRselect); 1287 1288 TSS2_RC 1289 Esys_Quote_Finish( 1290 ESYS_CONTEXT *esysContext, 1291 TPM2B_ATTEST **quoted, 1292 TPMT_SIGNATURE **signature); 1293 1294 /* Table 87 - TPM2_GetSessionAuditDigest Command */ 1295 1296 TSS2_RC 1297 Esys_GetSessionAuditDigest( 1298 ESYS_CONTEXT *esysContext, 1299 ESYS_TR privacyAdminHandle, 1300 ESYS_TR signHandle, 1301 ESYS_TR sessionHandle, 1302 ESYS_TR shandle1, 1303 ESYS_TR shandle2, 1304 ESYS_TR shandle3, 1305 const TPM2B_DATA *qualifyingData, 1306 const TPMT_SIG_SCHEME *inScheme, 1307 TPM2B_ATTEST **auditInfo, 1308 TPMT_SIGNATURE **signature); 1309 1310 TSS2_RC 1311 Esys_GetSessionAuditDigest_Async( 1312 ESYS_CONTEXT *esysContext, 1313 ESYS_TR privacyAdminHandle, 1314 ESYS_TR signHandle, 1315 ESYS_TR sessionHandle, 1316 ESYS_TR shandle1, 1317 ESYS_TR shandle2, 1318 ESYS_TR shandle3, 1319 const TPM2B_DATA *qualifyingData, 1320 const TPMT_SIG_SCHEME *inScheme); 1321 1322 TSS2_RC 1323 Esys_GetSessionAuditDigest_Finish( 1324 ESYS_CONTEXT *esysContext, 1325 TPM2B_ATTEST **auditInfo, 1326 TPMT_SIGNATURE **signature); 1327 1328 /* Table 89 - TPM2_GetCommandAuditDigest Command */ 1329 1330 TSS2_RC 1331 Esys_GetCommandAuditDigest( 1332 ESYS_CONTEXT *esysContext, 1333 ESYS_TR privacyHandle, 1334 ESYS_TR signHandle, 1335 ESYS_TR shandle1, 1336 ESYS_TR shandle2, 1337 ESYS_TR shandle3, 1338 const TPM2B_DATA *qualifyingData, 1339 const TPMT_SIG_SCHEME *inScheme, 1340 TPM2B_ATTEST **auditInfo, 1341 TPMT_SIGNATURE **signature); 1342 1343 TSS2_RC 1344 Esys_GetCommandAuditDigest_Async( 1345 ESYS_CONTEXT *esysContext, 1346 ESYS_TR privacyHandle, 1347 ESYS_TR signHandle, 1348 ESYS_TR shandle1, 1349 ESYS_TR shandle2, 1350 ESYS_TR shandle3, 1351 const TPM2B_DATA *qualifyingData, 1352 const TPMT_SIG_SCHEME *inScheme); 1353 1354 TSS2_RC 1355 Esys_GetCommandAuditDigest_Finish( 1356 ESYS_CONTEXT *esysContext, 1357 TPM2B_ATTEST **auditInfo, 1358 TPMT_SIGNATURE **signature); 1359 1360 /* Table 91 - TPM2_GetTime Command */ 1361 1362 TSS2_RC 1363 Esys_GetTime( 1364 ESYS_CONTEXT *esysContext, 1365 ESYS_TR privacyAdminHandle, 1366 ESYS_TR signHandle, 1367 ESYS_TR shandle1, 1368 ESYS_TR shandle2, 1369 ESYS_TR shandle3, 1370 const TPM2B_DATA *qualifyingData, 1371 const TPMT_SIG_SCHEME *inScheme, 1372 TPM2B_ATTEST **timeInfo, 1373 TPMT_SIGNATURE **signature); 1374 1375 TSS2_RC 1376 Esys_GetTime_Async( 1377 ESYS_CONTEXT *esysContext, 1378 ESYS_TR privacyAdminHandle, 1379 ESYS_TR signHandle, 1380 ESYS_TR shandle1, 1381 ESYS_TR shandle2, 1382 ESYS_TR shandle3, 1383 const TPM2B_DATA *qualifyingData, 1384 const TPMT_SIG_SCHEME *inScheme); 1385 1386 TSS2_RC 1387 Esys_GetTime_Finish( 1388 ESYS_CONTEXT *esysContext, 1389 TPM2B_ATTEST **timeInfo, 1390 TPMT_SIGNATURE **signature); 1391 1392 /* Table 93 - TPM2_Commit Command */ 1393 1394 TSS2_RC 1395 Esys_Commit( 1396 ESYS_CONTEXT *esysContext, 1397 ESYS_TR signHandle, 1398 ESYS_TR shandle1, 1399 ESYS_TR shandle2, 1400 ESYS_TR shandle3, 1401 const TPM2B_ECC_POINT *P1, 1402 const TPM2B_SENSITIVE_DATA *s2, 1403 const TPM2B_ECC_PARAMETER *y2, 1404 TPM2B_ECC_POINT **K, 1405 TPM2B_ECC_POINT **L, 1406 TPM2B_ECC_POINT **E, 1407 UINT16 *counter); 1408 1409 TSS2_RC 1410 Esys_Commit_Async( 1411 ESYS_CONTEXT *esysContext, 1412 ESYS_TR signHandle, 1413 ESYS_TR shandle1, 1414 ESYS_TR shandle2, 1415 ESYS_TR shandle3, 1416 const TPM2B_ECC_POINT *P1, 1417 const TPM2B_SENSITIVE_DATA *s2, 1418 const TPM2B_ECC_PARAMETER *y2); 1419 1420 TSS2_RC 1421 Esys_Commit_Finish( 1422 ESYS_CONTEXT *esysContext, 1423 TPM2B_ECC_POINT **K, 1424 TPM2B_ECC_POINT **L, 1425 TPM2B_ECC_POINT **E, 1426 UINT16 *counter); 1427 1428 /* Table 95 - TPM2_EC_Ephemeral Command */ 1429 1430 TSS2_RC 1431 Esys_EC_Ephemeral( 1432 ESYS_CONTEXT *esysContext, 1433 ESYS_TR shandle1, 1434 ESYS_TR shandle2, 1435 ESYS_TR shandle3, 1436 TPMI_ECC_CURVE curveID, 1437 TPM2B_ECC_POINT **Q, 1438 UINT16 *counter); 1439 1440 TSS2_RC 1441 Esys_EC_Ephemeral_Async( 1442 ESYS_CONTEXT *esysContext, 1443 ESYS_TR shandle1, 1444 ESYS_TR shandle2, 1445 ESYS_TR shandle3, 1446 TPMI_ECC_CURVE curveID); 1447 1448 TSS2_RC 1449 Esys_EC_Ephemeral_Finish( 1450 ESYS_CONTEXT *esysContext, 1451 TPM2B_ECC_POINT **Q, 1452 UINT16 *counter); 1453 1454 /* Table 97 - TPM2_VerifySignature Command */ 1455 1456 TSS2_RC 1457 Esys_VerifySignature( 1458 ESYS_CONTEXT *esysContext, 1459 ESYS_TR keyHandle, 1460 ESYS_TR shandle1, 1461 ESYS_TR shandle2, 1462 ESYS_TR shandle3, 1463 const TPM2B_DIGEST *digest, 1464 const TPMT_SIGNATURE *signature, 1465 TPMT_TK_VERIFIED **validation); 1466 1467 TSS2_RC 1468 Esys_VerifySignature_Async( 1469 ESYS_CONTEXT *esysContext, 1470 ESYS_TR keyHandle, 1471 ESYS_TR shandle1, 1472 ESYS_TR shandle2, 1473 ESYS_TR shandle3, 1474 const TPM2B_DIGEST *digest, 1475 const TPMT_SIGNATURE *signature); 1476 1477 TSS2_RC 1478 Esys_VerifySignature_Finish( 1479 ESYS_CONTEXT *esysContext, 1480 TPMT_TK_VERIFIED **validation); 1481 1482 /* Table 99 - TPM2_Sign Command */ 1483 1484 TSS2_RC 1485 Esys_Sign( 1486 ESYS_CONTEXT *esysContext, 1487 ESYS_TR keyHandle, 1488 ESYS_TR shandle1, 1489 ESYS_TR shandle2, 1490 ESYS_TR shandle3, 1491 const TPM2B_DIGEST *digest, 1492 const TPMT_SIG_SCHEME *inScheme, 1493 const TPMT_TK_HASHCHECK *validation, 1494 TPMT_SIGNATURE **signature); 1495 1496 TSS2_RC 1497 Esys_Sign_Async( 1498 ESYS_CONTEXT *esysContext, 1499 ESYS_TR keyHandle, 1500 ESYS_TR shandle1, 1501 ESYS_TR shandle2, 1502 ESYS_TR shandle3, 1503 const TPM2B_DIGEST *digest, 1504 const TPMT_SIG_SCHEME *inScheme, 1505 const TPMT_TK_HASHCHECK *validation); 1506 1507 TSS2_RC 1508 Esys_Sign_Finish( 1509 ESYS_CONTEXT *esysContext, 1510 TPMT_SIGNATURE **signature); 1511 1512 /* Table 101 - TPM2_SetCommandCodeAuditStatus Command */ 1513 1514 TSS2_RC 1515 Esys_SetCommandCodeAuditStatus( 1516 ESYS_CONTEXT *esysContext, 1517 ESYS_TR auth, 1518 ESYS_TR shandle1, 1519 ESYS_TR shandle2, 1520 ESYS_TR shandle3, 1521 TPMI_ALG_HASH auditAlg, 1522 const TPML_CC *setList, 1523 const TPML_CC *clearList); 1524 1525 TSS2_RC 1526 Esys_SetCommandCodeAuditStatus_Async( 1527 ESYS_CONTEXT *esysContext, 1528 ESYS_TR auth, 1529 ESYS_TR shandle1, 1530 ESYS_TR shandle2, 1531 ESYS_TR shandle3, 1532 TPMI_ALG_HASH auditAlg, 1533 const TPML_CC *setList, 1534 const TPML_CC *clearList); 1535 1536 TSS2_RC 1537 Esys_SetCommandCodeAuditStatus_Finish( 1538 ESYS_CONTEXT *esysContext); 1539 1540 /* Table 103 - TPM2_PCR_Extend Command */ 1541 1542 TSS2_RC 1543 Esys_PCR_Extend( 1544 ESYS_CONTEXT *esysContext, 1545 ESYS_TR pcrHandle, 1546 ESYS_TR shandle1, 1547 ESYS_TR shandle2, 1548 ESYS_TR shandle3, 1549 const TPML_DIGEST_VALUES *digests); 1550 1551 TSS2_RC 1552 Esys_PCR_Extend_Async( 1553 ESYS_CONTEXT *esysContext, 1554 ESYS_TR pcrHandle, 1555 ESYS_TR shandle1, 1556 ESYS_TR shandle2, 1557 ESYS_TR shandle3, 1558 const TPML_DIGEST_VALUES *digests); 1559 1560 TSS2_RC 1561 Esys_PCR_Extend_Finish( 1562 ESYS_CONTEXT *esysContext); 1563 1564 /* Table 105 - TPM2_PCR_Event Command */ 1565 1566 TSS2_RC 1567 Esys_PCR_Event( 1568 ESYS_CONTEXT *esysContext, 1569 ESYS_TR pcrHandle, 1570 ESYS_TR shandle1, 1571 ESYS_TR shandle2, 1572 ESYS_TR shandle3, 1573 const TPM2B_EVENT *eventData, 1574 TPML_DIGEST_VALUES **digests); 1575 1576 TSS2_RC 1577 Esys_PCR_Event_Async( 1578 ESYS_CONTEXT *esysContext, 1579 ESYS_TR pcrHandle, 1580 ESYS_TR shandle1, 1581 ESYS_TR shandle2, 1582 ESYS_TR shandle3, 1583 const TPM2B_EVENT *eventData); 1584 1585 TSS2_RC 1586 Esys_PCR_Event_Finish( 1587 ESYS_CONTEXT *esysContext, 1588 TPML_DIGEST_VALUES **digests); 1589 1590 /* Table 107 - TPM2_PCR_Read Command */ 1591 1592 TSS2_RC 1593 Esys_PCR_Read( 1594 ESYS_CONTEXT *esysContext, 1595 ESYS_TR shandle1, 1596 ESYS_TR shandle2, 1597 ESYS_TR shandle3, 1598 const TPML_PCR_SELECTION *pcrSelectionIn, 1599 UINT32 *pcrUpdateCounter, 1600 TPML_PCR_SELECTION **pcrSelectionOut, 1601 TPML_DIGEST **pcrValues); 1602 1603 TSS2_RC 1604 Esys_PCR_Read_Async( 1605 ESYS_CONTEXT *esysContext, 1606 ESYS_TR shandle1, 1607 ESYS_TR shandle2, 1608 ESYS_TR shandle3, 1609 const TPML_PCR_SELECTION *pcrSelectionIn); 1610 1611 TSS2_RC 1612 Esys_PCR_Read_Finish( 1613 ESYS_CONTEXT *esysContext, 1614 UINT32 *pcrUpdateCounter, 1615 TPML_PCR_SELECTION **pcrSelectionOut, 1616 TPML_DIGEST **pcrValues); 1617 1618 /* Table 109 - TPM2_PCR_Allocate Command */ 1619 1620 TSS2_RC 1621 Esys_PCR_Allocate( 1622 ESYS_CONTEXT *esysContext, 1623 ESYS_TR authHandle, 1624 ESYS_TR shandle1, 1625 ESYS_TR shandle2, 1626 ESYS_TR shandle3, 1627 const TPML_PCR_SELECTION *pcrAllocation, 1628 TPMI_YES_NO *allocationSuccess, 1629 UINT32 *maxPCR, 1630 UINT32 *sizeNeeded, 1631 UINT32 *sizeAvailable); 1632 1633 TSS2_RC 1634 Esys_PCR_Allocate_Async( 1635 ESYS_CONTEXT *esysContext, 1636 ESYS_TR authHandle, 1637 ESYS_TR shandle1, 1638 ESYS_TR shandle2, 1639 ESYS_TR shandle3, 1640 const TPML_PCR_SELECTION *pcrAllocation); 1641 1642 TSS2_RC 1643 Esys_PCR_Allocate_Finish( 1644 ESYS_CONTEXT *esysContext, 1645 TPMI_YES_NO *allocationSuccess, 1646 UINT32 *maxPCR, 1647 UINT32 *sizeNeeded, 1648 UINT32 *sizeAvailable); 1649 1650 /* Table 111 - TPM2_PCR_SetAuthPolicy Command */ 1651 1652 TSS2_RC 1653 Esys_PCR_SetAuthPolicy( 1654 ESYS_CONTEXT *esysContext, 1655 ESYS_TR authHandle, 1656 ESYS_TR shandle1, 1657 ESYS_TR shandle2, 1658 ESYS_TR shandle3, 1659 const TPM2B_DIGEST *authPolicy, 1660 TPMI_ALG_HASH hashAlg, 1661 TPMI_DH_PCR pcrNum); 1662 1663 TSS2_RC 1664 Esys_PCR_SetAuthPolicy_Async( 1665 ESYS_CONTEXT *esysContext, 1666 ESYS_TR authHandle, 1667 ESYS_TR shandle1, 1668 ESYS_TR shandle2, 1669 ESYS_TR shandle3, 1670 const TPM2B_DIGEST *authPolicy, 1671 TPMI_ALG_HASH hashAlg, 1672 TPMI_DH_PCR pcrNum); 1673 1674 TSS2_RC 1675 Esys_PCR_SetAuthPolicy_Finish( 1676 ESYS_CONTEXT *esysContext); 1677 1678 /* Table 113 - TPM2_PCR_SetAuthValue Command */ 1679 1680 TSS2_RC 1681 Esys_PCR_SetAuthValue( 1682 ESYS_CONTEXT *esysContext, 1683 ESYS_TR pcrHandle, 1684 ESYS_TR shandle1, 1685 ESYS_TR shandle2, 1686 ESYS_TR shandle3, 1687 const TPM2B_DIGEST *auth); 1688 1689 TSS2_RC 1690 Esys_PCR_SetAuthValue_Async( 1691 ESYS_CONTEXT *esysContext, 1692 ESYS_TR pcrHandle, 1693 ESYS_TR shandle1, 1694 ESYS_TR shandle2, 1695 ESYS_TR shandle3, 1696 const TPM2B_DIGEST *auth); 1697 1698 TSS2_RC 1699 Esys_PCR_SetAuthValue_Finish( 1700 ESYS_CONTEXT *esysContext); 1701 1702 /* Table 115 - TPM2_PCR_Reset Command */ 1703 1704 TSS2_RC 1705 Esys_PCR_Reset( 1706 ESYS_CONTEXT *esysContext, 1707 ESYS_TR pcrHandle, 1708 ESYS_TR shandle1, 1709 ESYS_TR shandle2, 1710 ESYS_TR shandle3); 1711 1712 TSS2_RC 1713 Esys_PCR_Reset_Async( 1714 ESYS_CONTEXT *esysContext, 1715 ESYS_TR pcrHandle, 1716 ESYS_TR shandle1, 1717 ESYS_TR shandle2, 1718 ESYS_TR shandle3); 1719 1720 TSS2_RC 1721 Esys_PCR_Reset_Finish( 1722 ESYS_CONTEXT *esysContext); 1723 1724 /* Table 117 - TPM2_PolicySigned Command */ 1725 1726 TSS2_RC 1727 Esys_PolicySigned( 1728 ESYS_CONTEXT *esysContext, 1729 ESYS_TR authObject, 1730 ESYS_TR policySession, 1731 ESYS_TR shandle1, 1732 ESYS_TR shandle2, 1733 ESYS_TR shandle3, 1734 const TPM2B_NONCE *nonceTPM, 1735 const TPM2B_DIGEST *cpHashA, 1736 const TPM2B_NONCE *policyRef, 1737 INT32 expiration, 1738 const TPMT_SIGNATURE *auth, 1739 TPM2B_TIMEOUT **timeout, 1740 TPMT_TK_AUTH **policyTicket); 1741 1742 TSS2_RC 1743 Esys_PolicySigned_Async( 1744 ESYS_CONTEXT *esysContext, 1745 ESYS_TR authObject, 1746 ESYS_TR policySession, 1747 ESYS_TR shandle1, 1748 ESYS_TR shandle2, 1749 ESYS_TR shandle3, 1750 const TPM2B_NONCE *nonceTPM, 1751 const TPM2B_DIGEST *cpHashA, 1752 const TPM2B_NONCE *policyRef, 1753 INT32 expiration, 1754 const TPMT_SIGNATURE *auth); 1755 1756 TSS2_RC 1757 Esys_PolicySigned_Finish( 1758 ESYS_CONTEXT *esysContext, 1759 TPM2B_TIMEOUT **timeout, 1760 TPMT_TK_AUTH **policyTicket); 1761 1762 /* Table 119 - TPM2_PolicySecret Command */ 1763 1764 TSS2_RC 1765 Esys_PolicySecret( 1766 ESYS_CONTEXT *esysContext, 1767 ESYS_TR authHandle, 1768 ESYS_TR policySession, 1769 ESYS_TR shandle1, 1770 ESYS_TR shandle2, 1771 ESYS_TR shandle3, 1772 const TPM2B_NONCE *nonceTPM, 1773 const TPM2B_DIGEST *cpHashA, 1774 const TPM2B_NONCE *policyRef, 1775 INT32 expiration, 1776 TPM2B_TIMEOUT **timeout, 1777 TPMT_TK_AUTH **policyTicket); 1778 1779 TSS2_RC 1780 Esys_PolicySecret_Async( 1781 ESYS_CONTEXT *esysContext, 1782 ESYS_TR authHandle, 1783 ESYS_TR policySession, 1784 ESYS_TR shandle1, 1785 ESYS_TR shandle2, 1786 ESYS_TR shandle3, 1787 const TPM2B_NONCE *nonceTPM, 1788 const TPM2B_DIGEST *cpHashA, 1789 const TPM2B_NONCE *policyRef, 1790 INT32 expiration); 1791 1792 TSS2_RC 1793 Esys_PolicySecret_Finish( 1794 ESYS_CONTEXT *esysContext, 1795 TPM2B_TIMEOUT **timeout, 1796 TPMT_TK_AUTH **policyTicket); 1797 1798 /* Table 121 - TPM2_PolicyTicket Command */ 1799 1800 TSS2_RC 1801 Esys_PolicyTicket( 1802 ESYS_CONTEXT *esysContext, 1803 ESYS_TR policySession, 1804 ESYS_TR shandle1, 1805 ESYS_TR shandle2, 1806 ESYS_TR shandle3, 1807 const TPM2B_TIMEOUT *timeout, 1808 const TPM2B_DIGEST *cpHashA, 1809 const TPM2B_NONCE *policyRef, 1810 const TPM2B_NAME *authName, 1811 const TPMT_TK_AUTH *ticket); 1812 1813 TSS2_RC 1814 Esys_PolicyTicket_Async( 1815 ESYS_CONTEXT *esysContext, 1816 ESYS_TR policySession, 1817 ESYS_TR shandle1, 1818 ESYS_TR shandle2, 1819 ESYS_TR shandle3, 1820 const TPM2B_TIMEOUT *timeout, 1821 const TPM2B_DIGEST *cpHashA, 1822 const TPM2B_NONCE *policyRef, 1823 const TPM2B_NAME *authName, 1824 const TPMT_TK_AUTH *ticket); 1825 1826 TSS2_RC 1827 Esys_PolicyTicket_Finish( 1828 ESYS_CONTEXT *esysContext); 1829 1830 /* Table 123 - TPM2_PolicyOR Command */ 1831 1832 TSS2_RC 1833 Esys_PolicyOR( 1834 ESYS_CONTEXT *esysContext, 1835 ESYS_TR policySession, 1836 ESYS_TR shandle1, 1837 ESYS_TR shandle2, 1838 ESYS_TR shandle3, 1839 const TPML_DIGEST *pHashList); 1840 1841 TSS2_RC 1842 Esys_PolicyOR_Async( 1843 ESYS_CONTEXT *esysContext, 1844 ESYS_TR policySession, 1845 ESYS_TR shandle1, 1846 ESYS_TR shandle2, 1847 ESYS_TR shandle3, 1848 const TPML_DIGEST *pHashList); 1849 1850 TSS2_RC 1851 Esys_PolicyOR_Finish( 1852 ESYS_CONTEXT *esysContext); 1853 1854 /* Table 125 - TPM2_PolicyPCR Command */ 1855 1856 TSS2_RC 1857 Esys_PolicyPCR( 1858 ESYS_CONTEXT *esysContext, 1859 ESYS_TR policySession, 1860 ESYS_TR shandle1, 1861 ESYS_TR shandle2, 1862 ESYS_TR shandle3, 1863 const TPM2B_DIGEST *pcrDigest, 1864 const TPML_PCR_SELECTION *pcrs); 1865 1866 TSS2_RC 1867 Esys_PolicyPCR_Async( 1868 ESYS_CONTEXT *esysContext, 1869 ESYS_TR policySession, 1870 ESYS_TR shandle1, 1871 ESYS_TR shandle2, 1872 ESYS_TR shandle3, 1873 const TPM2B_DIGEST *pcrDigest, 1874 const TPML_PCR_SELECTION *pcrs); 1875 1876 TSS2_RC 1877 Esys_PolicyPCR_Finish( 1878 ESYS_CONTEXT *esysContext); 1879 1880 /* Table 127 - TPM2_PolicyLocality Command */ 1881 1882 TSS2_RC 1883 Esys_PolicyLocality( 1884 ESYS_CONTEXT *esysContext, 1885 ESYS_TR policySession, 1886 ESYS_TR shandle1, 1887 ESYS_TR shandle2, 1888 ESYS_TR shandle3, 1889 TPMA_LOCALITY locality); 1890 1891 TSS2_RC 1892 Esys_PolicyLocality_Async( 1893 ESYS_CONTEXT *esysContext, 1894 ESYS_TR policySession, 1895 ESYS_TR shandle1, 1896 ESYS_TR shandle2, 1897 ESYS_TR shandle3, 1898 TPMA_LOCALITY locality); 1899 1900 TSS2_RC 1901 Esys_PolicyLocality_Finish( 1902 ESYS_CONTEXT *esysContext); 1903 1904 /* Table 129 - TPM2_PolicyNV Command */ 1905 1906 TSS2_RC 1907 Esys_PolicyNV( 1908 ESYS_CONTEXT *esysContext, 1909 ESYS_TR authHandle, 1910 ESYS_TR nvIndex, 1911 ESYS_TR policySession, 1912 ESYS_TR shandle1, 1913 ESYS_TR shandle2, 1914 ESYS_TR shandle3, 1915 const TPM2B_OPERAND *operandB, 1916 UINT16 offset, 1917 TPM2_EO operation); 1918 1919 TSS2_RC 1920 Esys_PolicyNV_Async( 1921 ESYS_CONTEXT *esysContext, 1922 ESYS_TR authHandle, 1923 ESYS_TR nvIndex, 1924 ESYS_TR policySession, 1925 ESYS_TR shandle1, 1926 ESYS_TR shandle2, 1927 ESYS_TR shandle3, 1928 const TPM2B_OPERAND *operandB, 1929 UINT16 offset, 1930 TPM2_EO operation); 1931 1932 TSS2_RC 1933 Esys_PolicyNV_Finish( 1934 ESYS_CONTEXT *esysContext); 1935 1936 /* Table 131 - TPM2_PolicyCounterTimer Command */ 1937 1938 TSS2_RC 1939 Esys_PolicyCounterTimer( 1940 ESYS_CONTEXT *esysContext, 1941 ESYS_TR policySession, 1942 ESYS_TR shandle1, 1943 ESYS_TR shandle2, 1944 ESYS_TR shandle3, 1945 const TPM2B_OPERAND *operandB, 1946 UINT16 offset, 1947 TPM2_EO operation); 1948 1949 TSS2_RC 1950 Esys_PolicyCounterTimer_Async( 1951 ESYS_CONTEXT *esysContext, 1952 ESYS_TR policySession, 1953 ESYS_TR shandle1, 1954 ESYS_TR shandle2, 1955 ESYS_TR shandle3, 1956 const TPM2B_OPERAND *operandB, 1957 UINT16 offset, 1958 TPM2_EO operation); 1959 1960 TSS2_RC 1961 Esys_PolicyCounterTimer_Finish( 1962 ESYS_CONTEXT *esysContext); 1963 1964 /* Table 133 - TPM2_PolicyCommandCode Command */ 1965 1966 TSS2_RC 1967 Esys_PolicyCommandCode( 1968 ESYS_CONTEXT *esysContext, 1969 ESYS_TR policySession, 1970 ESYS_TR shandle1, 1971 ESYS_TR shandle2, 1972 ESYS_TR shandle3, 1973 TPM2_CC code); 1974 1975 TSS2_RC 1976 Esys_PolicyCommandCode_Async( 1977 ESYS_CONTEXT *esysContext, 1978 ESYS_TR policySession, 1979 ESYS_TR shandle1, 1980 ESYS_TR shandle2, 1981 ESYS_TR shandle3, 1982 TPM2_CC code); 1983 1984 TSS2_RC 1985 Esys_PolicyCommandCode_Finish( 1986 ESYS_CONTEXT *esysContext); 1987 1988 /* Table 135 - TPM2_PolicyPhysicalPresence Command */ 1989 1990 TSS2_RC 1991 Esys_PolicyPhysicalPresence( 1992 ESYS_CONTEXT *esysContext, 1993 ESYS_TR policySession, 1994 ESYS_TR shandle1, 1995 ESYS_TR shandle2, 1996 ESYS_TR shandle3); 1997 1998 TSS2_RC 1999 Esys_PolicyPhysicalPresence_Async( 2000 ESYS_CONTEXT *esysContext, 2001 ESYS_TR policySession, 2002 ESYS_TR shandle1, 2003 ESYS_TR shandle2, 2004 ESYS_TR shandle3); 2005 2006 TSS2_RC 2007 Esys_PolicyPhysicalPresence_Finish( 2008 ESYS_CONTEXT *esysContext); 2009 2010 /* Table 137 - TPM2_PolicyCpHash Command */ 2011 2012 TSS2_RC 2013 Esys_PolicyCpHash( 2014 ESYS_CONTEXT *esysContext, 2015 ESYS_TR policySession, 2016 ESYS_TR shandle1, 2017 ESYS_TR shandle2, 2018 ESYS_TR shandle3, 2019 const TPM2B_DIGEST *cpHashA); 2020 2021 TSS2_RC 2022 Esys_PolicyCpHash_Async( 2023 ESYS_CONTEXT *esysContext, 2024 ESYS_TR policySession, 2025 ESYS_TR shandle1, 2026 ESYS_TR shandle2, 2027 ESYS_TR shandle3, 2028 const TPM2B_DIGEST *cpHashA); 2029 2030 TSS2_RC 2031 Esys_PolicyCpHash_Finish( 2032 ESYS_CONTEXT *esysContext); 2033 2034 /* Table 139 - TPM2_PolicyNameHash Command */ 2035 2036 TSS2_RC 2037 Esys_PolicyNameHash( 2038 ESYS_CONTEXT *esysContext, 2039 ESYS_TR policySession, 2040 ESYS_TR shandle1, 2041 ESYS_TR shandle2, 2042 ESYS_TR shandle3, 2043 const TPM2B_DIGEST *nameHash); 2044 2045 TSS2_RC 2046 Esys_PolicyNameHash_Async( 2047 ESYS_CONTEXT *esysContext, 2048 ESYS_TR policySession, 2049 ESYS_TR shandle1, 2050 ESYS_TR shandle2, 2051 ESYS_TR shandle3, 2052 const TPM2B_DIGEST *nameHash); 2053 2054 TSS2_RC 2055 Esys_PolicyNameHash_Finish( 2056 ESYS_CONTEXT *esysContext); 2057 2058 /* Table 141 - TPM2_PolicyDuplicationSelect Command */ 2059 2060 TSS2_RC 2061 Esys_PolicyDuplicationSelect( 2062 ESYS_CONTEXT *esysContext, 2063 ESYS_TR policySession, 2064 ESYS_TR shandle1, 2065 ESYS_TR shandle2, 2066 ESYS_TR shandle3, 2067 const TPM2B_NAME *objectName, 2068 const TPM2B_NAME *newParentName, 2069 TPMI_YES_NO includeObject); 2070 2071 TSS2_RC 2072 Esys_PolicyDuplicationSelect_Async( 2073 ESYS_CONTEXT *esysContext, 2074 ESYS_TR policySession, 2075 ESYS_TR shandle1, 2076 ESYS_TR shandle2, 2077 ESYS_TR shandle3, 2078 const TPM2B_NAME *objectName, 2079 const TPM2B_NAME *newParentName, 2080 TPMI_YES_NO includeObject); 2081 2082 TSS2_RC 2083 Esys_PolicyDuplicationSelect_Finish( 2084 ESYS_CONTEXT *esysContext); 2085 2086 /* Table 143 - TPM2_PolicyAuthorize Command */ 2087 2088 TSS2_RC 2089 Esys_PolicyAuthorize( 2090 ESYS_CONTEXT *esysContext, 2091 ESYS_TR policySession, 2092 ESYS_TR shandle1, 2093 ESYS_TR shandle2, 2094 ESYS_TR shandle3, 2095 const TPM2B_DIGEST *approvedPolicy, 2096 const TPM2B_NONCE *policyRef, 2097 const TPM2B_NAME *keySign, 2098 const TPMT_TK_VERIFIED *checkTicket); 2099 2100 TSS2_RC 2101 Esys_PolicyAuthorize_Async( 2102 ESYS_CONTEXT *esysContext, 2103 ESYS_TR policySession, 2104 ESYS_TR shandle1, 2105 ESYS_TR shandle2, 2106 ESYS_TR shandle3, 2107 const TPM2B_DIGEST *approvedPolicy, 2108 const TPM2B_NONCE *policyRef, 2109 const TPM2B_NAME *keySign, 2110 const TPMT_TK_VERIFIED *checkTicket); 2111 2112 TSS2_RC 2113 Esys_PolicyAuthorize_Finish( 2114 ESYS_CONTEXT *esysContext); 2115 2116 /* Table 145 - TPM2_PolicyAuthValue Command */ 2117 2118 TSS2_RC 2119 Esys_PolicyAuthValue( 2120 ESYS_CONTEXT *esysContext, 2121 ESYS_TR policySession, 2122 ESYS_TR shandle1, 2123 ESYS_TR shandle2, 2124 ESYS_TR shandle3); 2125 2126 TSS2_RC 2127 Esys_PolicyAuthValue_Async( 2128 ESYS_CONTEXT *esysContext, 2129 ESYS_TR policySession, 2130 ESYS_TR shandle1, 2131 ESYS_TR shandle2, 2132 ESYS_TR shandle3); 2133 2134 TSS2_RC 2135 Esys_PolicyAuthValue_Finish( 2136 ESYS_CONTEXT *esysContext); 2137 2138 /* Table 147 - TPM2_PolicyPassword Command */ 2139 2140 TSS2_RC 2141 Esys_PolicyPassword( 2142 ESYS_CONTEXT *esysContext, 2143 ESYS_TR policySession, 2144 ESYS_TR shandle1, 2145 ESYS_TR shandle2, 2146 ESYS_TR shandle3); 2147 2148 TSS2_RC 2149 Esys_PolicyPassword_Async( 2150 ESYS_CONTEXT *esysContext, 2151 ESYS_TR policySession, 2152 ESYS_TR shandle1, 2153 ESYS_TR shandle2, 2154 ESYS_TR shandle3); 2155 2156 TSS2_RC 2157 Esys_PolicyPassword_Finish( 2158 ESYS_CONTEXT *esysContext); 2159 2160 /* Table 149 - TPM2_PolicyGetDigest Command */ 2161 2162 TSS2_RC 2163 Esys_PolicyGetDigest( 2164 ESYS_CONTEXT *esysContext, 2165 ESYS_TR policySession, 2166 ESYS_TR shandle1, 2167 ESYS_TR shandle2, 2168 ESYS_TR shandle3, 2169 TPM2B_DIGEST **policyDigest); 2170 2171 TSS2_RC 2172 Esys_PolicyGetDigest_Async( 2173 ESYS_CONTEXT *esysContext, 2174 ESYS_TR policySession, 2175 ESYS_TR shandle1, 2176 ESYS_TR shandle2, 2177 ESYS_TR shandle3); 2178 2179 TSS2_RC 2180 Esys_PolicyGetDigest_Finish( 2181 ESYS_CONTEXT *esysContext, 2182 TPM2B_DIGEST **policyDigest); 2183 2184 /* Table 151 - TPM2_PolicyNvWritten Command */ 2185 2186 TSS2_RC 2187 Esys_PolicyNvWritten( 2188 ESYS_CONTEXT *esysContext, 2189 ESYS_TR policySession, 2190 ESYS_TR shandle1, 2191 ESYS_TR shandle2, 2192 ESYS_TR shandle3, 2193 TPMI_YES_NO writtenSet); 2194 2195 TSS2_RC 2196 Esys_PolicyNvWritten_Async( 2197 ESYS_CONTEXT *esysContext, 2198 ESYS_TR policySession, 2199 ESYS_TR shandle1, 2200 ESYS_TR shandle2, 2201 ESYS_TR shandle3, 2202 TPMI_YES_NO writtenSet); 2203 2204 TSS2_RC 2205 Esys_PolicyNvWritten_Finish( 2206 ESYS_CONTEXT *esysContext); 2207 2208 /* Table 153 - TPM2_PolicyTemplate Command */ 2209 2210 TSS2_RC 2211 Esys_PolicyTemplate( 2212 ESYS_CONTEXT *esysContext, 2213 ESYS_TR policySession, 2214 ESYS_TR shandle1, 2215 ESYS_TR shandle2, 2216 ESYS_TR shandle3, 2217 const TPM2B_DIGEST *templateHash); 2218 2219 TSS2_RC 2220 Esys_PolicyTemplate_Async( 2221 ESYS_CONTEXT *esysContext, 2222 ESYS_TR policySession, 2223 ESYS_TR shandle1, 2224 ESYS_TR shandle2, 2225 ESYS_TR shandle3, 2226 const TPM2B_DIGEST *templateHash); 2227 2228 TSS2_RC 2229 Esys_PolicyTemplate_Finish( 2230 ESYS_CONTEXT *esysContext); 2231 2232 /* Table 155 - TPM2_PolicyAuthorizeNV Command */ 2233 2234 TSS2_RC 2235 Esys_PolicyAuthorizeNV( 2236 ESYS_CONTEXT *esysContext, 2237 ESYS_TR authHandle, 2238 ESYS_TR nvIndex, 2239 ESYS_TR policySession, 2240 ESYS_TR shandle1, 2241 ESYS_TR shandle2, 2242 ESYS_TR shandle3); 2243 2244 TSS2_RC 2245 Esys_PolicyAuthorizeNV_Async( 2246 ESYS_CONTEXT *esysContext, 2247 ESYS_TR authHandle, 2248 ESYS_TR nvIndex, 2249 ESYS_TR policySession, 2250 ESYS_TR shandle1, 2251 ESYS_TR shandle2, 2252 ESYS_TR shandle3); 2253 2254 TSS2_RC 2255 Esys_PolicyAuthorizeNV_Finish( 2256 ESYS_CONTEXT *esysContext); 2257 2258 /* Table 157 - TPM2_CreatePrimary Command */ 2259 2260 TSS2_RC 2261 Esys_CreatePrimary( 2262 ESYS_CONTEXT *esysContext, 2263 ESYS_TR primaryHandle, 2264 ESYS_TR shandle1, 2265 ESYS_TR shandle2, 2266 ESYS_TR shandle3, 2267 const TPM2B_SENSITIVE_CREATE *inSensitive, 2268 const TPM2B_PUBLIC *inPublic, 2269 const TPM2B_DATA *outsideInfo, 2270 const TPML_PCR_SELECTION *creationPCR, 2271 ESYS_TR *objectHandle, 2272 TPM2B_PUBLIC **outPublic, 2273 TPM2B_CREATION_DATA **creationData, 2274 TPM2B_DIGEST **creationHash, 2275 TPMT_TK_CREATION **creationTicket); 2276 2277 TSS2_RC 2278 Esys_CreatePrimary_Async( 2279 ESYS_CONTEXT *esysContext, 2280 ESYS_TR primaryHandle, 2281 ESYS_TR shandle1, 2282 ESYS_TR shandle2, 2283 ESYS_TR shandle3, 2284 const TPM2B_SENSITIVE_CREATE *inSensitive, 2285 const TPM2B_PUBLIC *inPublic, 2286 const TPM2B_DATA *outsideInfo, 2287 const TPML_PCR_SELECTION *creationPCR); 2288 2289 TSS2_RC 2290 Esys_CreatePrimary_Finish( 2291 ESYS_CONTEXT *esysContext, 2292 ESYS_TR *objectHandle, 2293 TPM2B_PUBLIC **outPublic, 2294 TPM2B_CREATION_DATA **creationData, 2295 TPM2B_DIGEST **creationHash, 2296 TPMT_TK_CREATION **creationTicket); 2297 2298 /* Table 159 - TPM2_HierarchyControl Command */ 2299 2300 TSS2_RC 2301 Esys_HierarchyControl( 2302 ESYS_CONTEXT *esysContext, 2303 ESYS_TR authHandle, 2304 ESYS_TR shandle1, 2305 ESYS_TR shandle2, 2306 ESYS_TR shandle3, 2307 TPMI_RH_ENABLES enable, 2308 TPMI_YES_NO state); 2309 2310 TSS2_RC 2311 Esys_HierarchyControl_Async( 2312 ESYS_CONTEXT *esysContext, 2313 ESYS_TR authHandle, 2314 ESYS_TR shandle1, 2315 ESYS_TR shandle2, 2316 ESYS_TR shandle3, 2317 TPMI_RH_ENABLES enable, 2318 TPMI_YES_NO state); 2319 2320 TSS2_RC 2321 Esys_HierarchyControl_Finish( 2322 ESYS_CONTEXT *esysContext); 2323 2324 /* Table 161 - TPM2_SetPrimaryPolicy Command */ 2325 2326 TSS2_RC 2327 Esys_SetPrimaryPolicy( 2328 ESYS_CONTEXT *esysContext, 2329 ESYS_TR authHandle, 2330 ESYS_TR shandle1, 2331 ESYS_TR shandle2, 2332 ESYS_TR shandle3, 2333 const TPM2B_DIGEST *authPolicy, 2334 TPMI_ALG_HASH hashAlg); 2335 2336 TSS2_RC 2337 Esys_SetPrimaryPolicy_Async( 2338 ESYS_CONTEXT *esysContext, 2339 ESYS_TR authHandle, 2340 ESYS_TR shandle1, 2341 ESYS_TR shandle2, 2342 ESYS_TR shandle3, 2343 const TPM2B_DIGEST *authPolicy, 2344 TPMI_ALG_HASH hashAlg); 2345 2346 TSS2_RC 2347 Esys_SetPrimaryPolicy_Finish( 2348 ESYS_CONTEXT *esysContext); 2349 2350 /* Table 163 - TPM2_ChangePPS Command */ 2351 2352 TSS2_RC 2353 Esys_ChangePPS( 2354 ESYS_CONTEXT *esysContext, 2355 ESYS_TR authHandle, 2356 ESYS_TR shandle1, 2357 ESYS_TR shandle2, 2358 ESYS_TR shandle3); 2359 2360 TSS2_RC 2361 Esys_ChangePPS_Async( 2362 ESYS_CONTEXT *esysContext, 2363 ESYS_TR authHandle, 2364 ESYS_TR shandle1, 2365 ESYS_TR shandle2, 2366 ESYS_TR shandle3); 2367 2368 TSS2_RC 2369 Esys_ChangePPS_Finish( 2370 ESYS_CONTEXT *esysContext); 2371 2372 /* Table 165 - TPM2_ChangeEPS Command */ 2373 2374 TSS2_RC 2375 Esys_ChangeEPS( 2376 ESYS_CONTEXT *esysContext, 2377 ESYS_TR authHandle, 2378 ESYS_TR shandle1, 2379 ESYS_TR shandle2, 2380 ESYS_TR shandle3); 2381 2382 TSS2_RC 2383 Esys_ChangeEPS_Async( 2384 ESYS_CONTEXT *esysContext, 2385 ESYS_TR authHandle, 2386 ESYS_TR shandle1, 2387 ESYS_TR shandle2, 2388 ESYS_TR shandle3); 2389 2390 TSS2_RC 2391 Esys_ChangeEPS_Finish( 2392 ESYS_CONTEXT *esysContext); 2393 2394 /* Table 167 - TPM2_Clear Command */ 2395 2396 TSS2_RC 2397 Esys_Clear( 2398 ESYS_CONTEXT *esysContext, 2399 ESYS_TR authHandle, 2400 ESYS_TR shandle1, 2401 ESYS_TR shandle2, 2402 ESYS_TR shandle3); 2403 2404 TSS2_RC 2405 Esys_Clear_Async( 2406 ESYS_CONTEXT *esysContext, 2407 ESYS_TR authHandle, 2408 ESYS_TR shandle1, 2409 ESYS_TR shandle2, 2410 ESYS_TR shandle3); 2411 2412 TSS2_RC 2413 Esys_Clear_Finish( 2414 ESYS_CONTEXT *esysContext); 2415 2416 /* Table 169 - TPM2_ClearControl Command */ 2417 2418 TSS2_RC 2419 Esys_ClearControl( 2420 ESYS_CONTEXT *esysContext, 2421 ESYS_TR auth, 2422 ESYS_TR shandle1, 2423 ESYS_TR shandle2, 2424 ESYS_TR shandle3, 2425 TPMI_YES_NO disable); 2426 2427 TSS2_RC 2428 Esys_ClearControl_Async( 2429 ESYS_CONTEXT *esysContext, 2430 ESYS_TR auth, 2431 ESYS_TR shandle1, 2432 ESYS_TR shandle2, 2433 ESYS_TR shandle3, 2434 TPMI_YES_NO disable); 2435 2436 TSS2_RC 2437 Esys_ClearControl_Finish( 2438 ESYS_CONTEXT *esysContext); 2439 2440 /* Table 171 - TPM2_HierarchyChangeAuth Command */ 2441 2442 TSS2_RC 2443 Esys_HierarchyChangeAuth( 2444 ESYS_CONTEXT *esysContext, 2445 ESYS_TR authHandle, 2446 ESYS_TR shandle1, 2447 ESYS_TR shandle2, 2448 ESYS_TR shandle3, 2449 const TPM2B_AUTH *newAuth); 2450 2451 TSS2_RC 2452 Esys_HierarchyChangeAuth_Async( 2453 ESYS_CONTEXT *esysContext, 2454 ESYS_TR authHandle, 2455 ESYS_TR shandle1, 2456 ESYS_TR shandle2, 2457 ESYS_TR shandle3, 2458 const TPM2B_AUTH *newAuth); 2459 2460 TSS2_RC 2461 Esys_HierarchyChangeAuth_Finish( 2462 ESYS_CONTEXT *esysContext); 2463 2464 /* Table 173 - TPM2_DictionaryAttackLockReset Command */ 2465 2466 TSS2_RC 2467 Esys_DictionaryAttackLockReset( 2468 ESYS_CONTEXT *esysContext, 2469 ESYS_TR lockHandle, 2470 ESYS_TR shandle1, 2471 ESYS_TR shandle2, 2472 ESYS_TR shandle3); 2473 2474 TSS2_RC 2475 Esys_DictionaryAttackLockReset_Async( 2476 ESYS_CONTEXT *esysContext, 2477 ESYS_TR lockHandle, 2478 ESYS_TR shandle1, 2479 ESYS_TR shandle2, 2480 ESYS_TR shandle3); 2481 2482 TSS2_RC 2483 Esys_DictionaryAttackLockReset_Finish( 2484 ESYS_CONTEXT *esysContext); 2485 2486 /* Table 175 - TPM2_DictionaryAttackParameters Command */ 2487 2488 TSS2_RC 2489 Esys_DictionaryAttackParameters( 2490 ESYS_CONTEXT *esysContext, 2491 ESYS_TR lockHandle, 2492 ESYS_TR shandle1, 2493 ESYS_TR shandle2, 2494 ESYS_TR shandle3, 2495 UINT32 newMaxTries, 2496 UINT32 newRecoveryTime, 2497 UINT32 lockoutRecovery); 2498 2499 TSS2_RC 2500 Esys_DictionaryAttackParameters_Async( 2501 ESYS_CONTEXT *esysContext, 2502 ESYS_TR lockHandle, 2503 ESYS_TR shandle1, 2504 ESYS_TR shandle2, 2505 ESYS_TR shandle3, 2506 UINT32 newMaxTries, 2507 UINT32 newRecoveryTime, 2508 UINT32 lockoutRecovery); 2509 2510 TSS2_RC 2511 Esys_DictionaryAttackParameters_Finish( 2512 ESYS_CONTEXT *esysContext); 2513 2514 /* Table 177 - TPM2_PP_Commands Command */ 2515 2516 TSS2_RC 2517 Esys_PP_Commands( 2518 ESYS_CONTEXT *esysContext, 2519 ESYS_TR auth, 2520 ESYS_TR shandle1, 2521 ESYS_TR shandle2, 2522 ESYS_TR shandle3, 2523 const TPML_CC *setList, 2524 const TPML_CC *clearList); 2525 2526 TSS2_RC 2527 Esys_PP_Commands_Async( 2528 ESYS_CONTEXT *esysContext, 2529 ESYS_TR auth, 2530 ESYS_TR shandle1, 2531 ESYS_TR shandle2, 2532 ESYS_TR shandle3, 2533 const TPML_CC *setList, 2534 const TPML_CC *clearList); 2535 2536 TSS2_RC 2537 Esys_PP_Commands_Finish( 2538 ESYS_CONTEXT *esysContext); 2539 2540 /* Table 179 - TPM2_SetAlgorithmSet Command */ 2541 2542 TSS2_RC 2543 Esys_SetAlgorithmSet( 2544 ESYS_CONTEXT *esysContext, 2545 ESYS_TR authHandle, 2546 ESYS_TR shandle1, 2547 ESYS_TR shandle2, 2548 ESYS_TR shandle3, 2549 UINT32 algorithmSet); 2550 2551 TSS2_RC 2552 Esys_SetAlgorithmSet_Async( 2553 ESYS_CONTEXT *esysContext, 2554 ESYS_TR authHandle, 2555 ESYS_TR shandle1, 2556 ESYS_TR shandle2, 2557 ESYS_TR shandle3, 2558 UINT32 algorithmSet); 2559 2560 TSS2_RC 2561 Esys_SetAlgorithmSet_Finish( 2562 ESYS_CONTEXT *esysContext); 2563 2564 /* Table 181 - TPM2_FieldUpgradeStart Command */ 2565 2566 TSS2_RC 2567 Esys_FieldUpgradeStart( 2568 ESYS_CONTEXT *esysContext, 2569 ESYS_TR authorization, 2570 ESYS_TR keyHandle, 2571 ESYS_TR shandle1, 2572 ESYS_TR shandle2, 2573 ESYS_TR shandle3, 2574 const TPM2B_DIGEST *fuDigest, 2575 const TPMT_SIGNATURE *manifestSignature); 2576 2577 TSS2_RC 2578 Esys_FieldUpgradeStart_Async( 2579 ESYS_CONTEXT *esysContext, 2580 ESYS_TR authorization, 2581 ESYS_TR keyHandle, 2582 ESYS_TR shandle1, 2583 ESYS_TR shandle2, 2584 ESYS_TR shandle3, 2585 const TPM2B_DIGEST *fuDigest, 2586 const TPMT_SIGNATURE *manifestSignature); 2587 2588 TSS2_RC 2589 Esys_FieldUpgradeStart_Finish( 2590 ESYS_CONTEXT *esysContext); 2591 2592 /* Table 183 - TPM2_FieldUpgradeData Command */ 2593 2594 TSS2_RC 2595 Esys_FieldUpgradeData( 2596 ESYS_CONTEXT *esysContext, 2597 ESYS_TR shandle1, 2598 ESYS_TR shandle2, 2599 ESYS_TR shandle3, 2600 const TPM2B_MAX_BUFFER *fuData, 2601 TPMT_HA **nextDigest, 2602 TPMT_HA **firstDigest); 2603 2604 TSS2_RC 2605 Esys_FieldUpgradeData_Async( 2606 ESYS_CONTEXT *esysContext, 2607 ESYS_TR shandle1, 2608 ESYS_TR shandle2, 2609 ESYS_TR shandle3, 2610 const TPM2B_MAX_BUFFER *fuData); 2611 2612 TSS2_RC 2613 Esys_FieldUpgradeData_Finish( 2614 ESYS_CONTEXT *esysContext, 2615 TPMT_HA **nextDigest, 2616 TPMT_HA **firstDigest); 2617 2618 /* Table 185 - TPM2_FirmwareRead Command */ 2619 2620 TSS2_RC 2621 Esys_FirmwareRead( 2622 ESYS_CONTEXT *esysContext, 2623 ESYS_TR shandle1, 2624 ESYS_TR shandle2, 2625 ESYS_TR shandle3, 2626 UINT32 sequenceNumber, 2627 TPM2B_MAX_BUFFER **fuData); 2628 2629 TSS2_RC 2630 Esys_FirmwareRead_Async( 2631 ESYS_CONTEXT *esysContext, 2632 ESYS_TR shandle1, 2633 ESYS_TR shandle2, 2634 ESYS_TR shandle3, 2635 UINT32 sequenceNumber); 2636 2637 TSS2_RC 2638 Esys_FirmwareRead_Finish( 2639 ESYS_CONTEXT *esysContext, 2640 TPM2B_MAX_BUFFER **fuData); 2641 2642 /* Table 187 - TPM2_ContextSave Command */ 2643 2644 TSS2_RC 2645 Esys_ContextSave( 2646 ESYS_CONTEXT *esysContext, 2647 ESYS_TR saveHandle, 2648 TPMS_CONTEXT **context); 2649 2650 TSS2_RC 2651 Esys_ContextSave_Async( 2652 ESYS_CONTEXT *esysContext, 2653 ESYS_TR saveHandle); 2654 2655 TSS2_RC 2656 Esys_ContextSave_Finish( 2657 ESYS_CONTEXT *esysContext, 2658 TPMS_CONTEXT **context); 2659 2660 /* Table 189 - TPM2_ContextLoad Command */ 2661 2662 TSS2_RC 2663 Esys_ContextLoad( 2664 ESYS_CONTEXT *esysContext, 2665 const TPMS_CONTEXT *context, 2666 ESYS_TR *loadedHandle); 2667 2668 TSS2_RC 2669 Esys_ContextLoad_Async( 2670 ESYS_CONTEXT *esysContext, 2671 const TPMS_CONTEXT *context); 2672 2673 TSS2_RC 2674 Esys_ContextLoad_Finish( 2675 ESYS_CONTEXT *esysContext, 2676 ESYS_TR *loadedHandle); 2677 2678 /* Table 191 - TPM2_FlushContext Command */ 2679 2680 TSS2_RC 2681 Esys_FlushContext( 2682 ESYS_CONTEXT *esysContext, 2683 ESYS_TR flushHandle); 2684 2685 TSS2_RC 2686 Esys_FlushContext_Async( 2687 ESYS_CONTEXT *esysContext, 2688 ESYS_TR flushHandle); 2689 2690 TSS2_RC 2691 Esys_FlushContext_Finish( 2692 ESYS_CONTEXT *esysContext); 2693 2694 /* Table 193 - TPM2_EvictControl Command */ 2695 2696 TSS2_RC 2697 Esys_EvictControl( 2698 ESYS_CONTEXT *esysContext, 2699 ESYS_TR auth, 2700 ESYS_TR objectHandle, 2701 ESYS_TR shandle1, 2702 ESYS_TR shandle2, 2703 ESYS_TR shandle3, 2704 TPMI_DH_PERSISTENT persistentHandle, 2705 ESYS_TR *newObjectHandle); 2706 2707 TSS2_RC 2708 Esys_EvictControl_Async( 2709 ESYS_CONTEXT *esysContext, 2710 ESYS_TR auth, 2711 ESYS_TR objectHandle, 2712 ESYS_TR shandle1, 2713 ESYS_TR shandle2, 2714 ESYS_TR shandle3, 2715 TPMI_DH_PERSISTENT persistentHandle); 2716 2717 TSS2_RC 2718 Esys_EvictControl_Finish( 2719 ESYS_CONTEXT *esysContext, 2720 ESYS_TR *newObjectHandle); 2721 2722 /* Table 195 - TPM2_ReadClock Command */ 2723 2724 TSS2_RC 2725 Esys_ReadClock( 2726 ESYS_CONTEXT *esysContext, 2727 ESYS_TR shandle1, 2728 ESYS_TR shandle2, 2729 ESYS_TR shandle3, 2730 TPMS_TIME_INFO **currentTime); 2731 2732 TSS2_RC 2733 Esys_ReadClock_Async( 2734 ESYS_CONTEXT *esysContext, 2735 ESYS_TR shandle1, 2736 ESYS_TR shandle2, 2737 ESYS_TR shandle3); 2738 2739 TSS2_RC 2740 Esys_ReadClock_Finish( 2741 ESYS_CONTEXT *esysContext, 2742 TPMS_TIME_INFO **currentTime); 2743 2744 /* Table 197 - TPM2_ClockSet Command */ 2745 2746 TSS2_RC 2747 Esys_ClockSet( 2748 ESYS_CONTEXT *esysContext, 2749 ESYS_TR auth, 2750 ESYS_TR shandle1, 2751 ESYS_TR shandle2, 2752 ESYS_TR shandle3, 2753 UINT64 newTime); 2754 2755 TSS2_RC 2756 Esys_ClockSet_Async( 2757 ESYS_CONTEXT *esysContext, 2758 ESYS_TR auth, 2759 ESYS_TR shandle1, 2760 ESYS_TR shandle2, 2761 ESYS_TR shandle3, 2762 UINT64 newTime); 2763 2764 TSS2_RC 2765 Esys_ClockSet_Finish( 2766 ESYS_CONTEXT *esysContext); 2767 2768 /* Table 199 - TPM2_ClockRateAdjust Command */ 2769 2770 TSS2_RC 2771 Esys_ClockRateAdjust( 2772 ESYS_CONTEXT *esysContext, 2773 ESYS_TR auth, 2774 ESYS_TR shandle1, 2775 ESYS_TR shandle2, 2776 ESYS_TR shandle3, 2777 TPM2_CLOCK_ADJUST rateAdjust); 2778 2779 TSS2_RC 2780 Esys_ClockRateAdjust_Async( 2781 ESYS_CONTEXT *esysContext, 2782 ESYS_TR auth, 2783 ESYS_TR shandle1, 2784 ESYS_TR shandle2, 2785 ESYS_TR shandle3, 2786 TPM2_CLOCK_ADJUST rateAdjust); 2787 2788 TSS2_RC 2789 Esys_ClockRateAdjust_Finish( 2790 ESYS_CONTEXT *esysContext); 2791 2792 /* Table 201 - TPM2_GetCapability Command */ 2793 2794 TSS2_RC 2795 Esys_GetCapability( 2796 ESYS_CONTEXT *esysContext, 2797 ESYS_TR shandle1, 2798 ESYS_TR shandle2, 2799 ESYS_TR shandle3, 2800 TPM2_CAP capability, 2801 UINT32 property, 2802 UINT32 propertyCount, 2803 TPMI_YES_NO *moreData, 2804 TPMS_CAPABILITY_DATA **capabilityData); 2805 2806 TSS2_RC 2807 Esys_GetCapability_Async( 2808 ESYS_CONTEXT *esysContext, 2809 ESYS_TR shandle1, 2810 ESYS_TR shandle2, 2811 ESYS_TR shandle3, 2812 TPM2_CAP capability, 2813 UINT32 property, 2814 UINT32 propertyCount); 2815 2816 TSS2_RC 2817 Esys_GetCapability_Finish( 2818 ESYS_CONTEXT *esysContext, 2819 TPMI_YES_NO *moreData, 2820 TPMS_CAPABILITY_DATA **capabilityData); 2821 2822 /* Table 203 - TPM2_TestParms Command */ 2823 2824 TSS2_RC 2825 Esys_TestParms( 2826 ESYS_CONTEXT *esysContext, 2827 ESYS_TR shandle1, 2828 ESYS_TR shandle2, 2829 ESYS_TR shandle3, 2830 const TPMT_PUBLIC_PARMS *parameters); 2831 2832 TSS2_RC 2833 Esys_TestParms_Async( 2834 ESYS_CONTEXT *esysContext, 2835 ESYS_TR shandle1, 2836 ESYS_TR shandle2, 2837 ESYS_TR shandle3, 2838 const TPMT_PUBLIC_PARMS *parameters); 2839 2840 TSS2_RC 2841 Esys_TestParms_Finish( 2842 ESYS_CONTEXT *esysContext); 2843 2844 /* Table 205 - TPM2_NV_DefineSpace Command */ 2845 2846 TSS2_RC 2847 Esys_NV_DefineSpace( 2848 ESYS_CONTEXT *esysContext, 2849 ESYS_TR authHandle, 2850 ESYS_TR shandle1, 2851 ESYS_TR shandle2, 2852 ESYS_TR shandle3, 2853 const TPM2B_AUTH *auth, 2854 const TPM2B_NV_PUBLIC *publicInfo, 2855 ESYS_TR *nvHandle); 2856 2857 TSS2_RC 2858 Esys_NV_DefineSpace_Async( 2859 ESYS_CONTEXT *esysContext, 2860 ESYS_TR authHandle, 2861 ESYS_TR shandle1, 2862 ESYS_TR shandle2, 2863 ESYS_TR shandle3, 2864 const TPM2B_AUTH *auth, 2865 const TPM2B_NV_PUBLIC *publicInfo); 2866 2867 TSS2_RC 2868 Esys_NV_DefineSpace_Finish( 2869 ESYS_CONTEXT *esysContext, 2870 ESYS_TR *nvHandle); 2871 2872 /* Table 207 - TPM2_NV_UndefineSpace Command */ 2873 2874 TSS2_RC 2875 Esys_NV_UndefineSpace( 2876 ESYS_CONTEXT *esysContext, 2877 ESYS_TR authHandle, 2878 ESYS_TR nvIndex, 2879 ESYS_TR shandle1, 2880 ESYS_TR shandle2, 2881 ESYS_TR shandle3); 2882 2883 TSS2_RC 2884 Esys_NV_UndefineSpace_Async( 2885 ESYS_CONTEXT *esysContext, 2886 ESYS_TR authHandle, 2887 ESYS_TR nvIndex, 2888 ESYS_TR shandle1, 2889 ESYS_TR shandle2, 2890 ESYS_TR shandle3); 2891 2892 TSS2_RC 2893 Esys_NV_UndefineSpace_Finish( 2894 ESYS_CONTEXT *esysContext); 2895 2896 /* Table 209 - TPM2_NV_UndefineSpaceSpecial Command */ 2897 2898 TSS2_RC 2899 Esys_NV_UndefineSpaceSpecial( 2900 ESYS_CONTEXT *esysContext, 2901 ESYS_TR nvIndex, 2902 ESYS_TR platform, 2903 ESYS_TR shandle1, 2904 ESYS_TR shandle2, 2905 ESYS_TR shandle3); 2906 2907 TSS2_RC 2908 Esys_NV_UndefineSpaceSpecial_Async( 2909 ESYS_CONTEXT *esysContext, 2910 ESYS_TR nvIndex, 2911 ESYS_TR platform, 2912 ESYS_TR shandle1, 2913 ESYS_TR shandle2, 2914 ESYS_TR shandle3); 2915 2916 TSS2_RC 2917 Esys_NV_UndefineSpaceSpecial_Finish( 2918 ESYS_CONTEXT *esysContext); 2919 2920 /* Table 211 - TPM2_NV_ReadPublic Command */ 2921 2922 TSS2_RC 2923 Esys_NV_ReadPublic( 2924 ESYS_CONTEXT *esysContext, 2925 ESYS_TR nvIndex, 2926 ESYS_TR shandle1, 2927 ESYS_TR shandle2, 2928 ESYS_TR shandle3, 2929 TPM2B_NV_PUBLIC **nvPublic, 2930 TPM2B_NAME **nvName); 2931 2932 TSS2_RC 2933 Esys_NV_ReadPublic_Async( 2934 ESYS_CONTEXT *esysContext, 2935 ESYS_TR nvIndex, 2936 ESYS_TR shandle1, 2937 ESYS_TR shandle2, 2938 ESYS_TR shandle3); 2939 2940 TSS2_RC 2941 Esys_NV_ReadPublic_Finish( 2942 ESYS_CONTEXT *esysContext, 2943 TPM2B_NV_PUBLIC **nvPublic, 2944 TPM2B_NAME **nvName); 2945 2946 /* Table 213 - TPM2_NV_Write Command */ 2947 2948 TSS2_RC 2949 Esys_NV_Write( 2950 ESYS_CONTEXT *esysContext, 2951 ESYS_TR authHandle, 2952 ESYS_TR nvIndex, 2953 ESYS_TR shandle1, 2954 ESYS_TR shandle2, 2955 ESYS_TR shandle3, 2956 const TPM2B_MAX_NV_BUFFER *data, 2957 UINT16 offset); 2958 2959 TSS2_RC 2960 Esys_NV_Write_Async( 2961 ESYS_CONTEXT *esysContext, 2962 ESYS_TR authHandle, 2963 ESYS_TR nvIndex, 2964 ESYS_TR shandle1, 2965 ESYS_TR shandle2, 2966 ESYS_TR shandle3, 2967 const TPM2B_MAX_NV_BUFFER *data, 2968 UINT16 offset); 2969 2970 TSS2_RC 2971 Esys_NV_Write_Finish( 2972 ESYS_CONTEXT *esysContext); 2973 2974 /* Table 215 - TPM2_NV_Increment Command */ 2975 2976 TSS2_RC 2977 Esys_NV_Increment( 2978 ESYS_CONTEXT *esysContext, 2979 ESYS_TR authHandle, 2980 ESYS_TR nvIndex, 2981 ESYS_TR shandle1, 2982 ESYS_TR shandle2, 2983 ESYS_TR shandle3); 2984 2985 TSS2_RC 2986 Esys_NV_Increment_Async( 2987 ESYS_CONTEXT *esysContext, 2988 ESYS_TR authHandle, 2989 ESYS_TR nvIndex, 2990 ESYS_TR shandle1, 2991 ESYS_TR shandle2, 2992 ESYS_TR shandle3); 2993 2994 TSS2_RC 2995 Esys_NV_Increment_Finish( 2996 ESYS_CONTEXT *esysContext); 2997 2998 /* Table 217 - TPM2_NV_Extend Command */ 2999 3000 TSS2_RC 3001 Esys_NV_Extend( 3002 ESYS_CONTEXT *esysContext, 3003 ESYS_TR authHandle, 3004 ESYS_TR nvIndex, 3005 ESYS_TR shandle1, 3006 ESYS_TR shandle2, 3007 ESYS_TR shandle3, 3008 const TPM2B_MAX_NV_BUFFER *data); 3009 3010 TSS2_RC 3011 Esys_NV_Extend_Async( 3012 ESYS_CONTEXT *esysContext, 3013 ESYS_TR authHandle, 3014 ESYS_TR nvIndex, 3015 ESYS_TR shandle1, 3016 ESYS_TR shandle2, 3017 ESYS_TR shandle3, 3018 const TPM2B_MAX_NV_BUFFER *data); 3019 3020 TSS2_RC 3021 Esys_NV_Extend_Finish( 3022 ESYS_CONTEXT *esysContext); 3023 3024 /* Table 219 - TPM2_NV_SetBits Command */ 3025 3026 TSS2_RC 3027 Esys_NV_SetBits( 3028 ESYS_CONTEXT *esysContext, 3029 ESYS_TR authHandle, 3030 ESYS_TR nvIndex, 3031 ESYS_TR shandle1, 3032 ESYS_TR shandle2, 3033 ESYS_TR shandle3, 3034 UINT64 bits); 3035 3036 TSS2_RC 3037 Esys_NV_SetBits_Async( 3038 ESYS_CONTEXT *esysContext, 3039 ESYS_TR authHandle, 3040 ESYS_TR nvIndex, 3041 ESYS_TR shandle1, 3042 ESYS_TR shandle2, 3043 ESYS_TR shandle3, 3044 UINT64 bits); 3045 3046 TSS2_RC 3047 Esys_NV_SetBits_Finish( 3048 ESYS_CONTEXT *esysContext); 3049 3050 /* Table 221 - TPM2_NV_WriteLock Command */ 3051 3052 TSS2_RC 3053 Esys_NV_WriteLock( 3054 ESYS_CONTEXT *esysContext, 3055 ESYS_TR authHandle, 3056 ESYS_TR nvIndex, 3057 ESYS_TR shandle1, 3058 ESYS_TR shandle2, 3059 ESYS_TR shandle3); 3060 3061 TSS2_RC 3062 Esys_NV_WriteLock_Async( 3063 ESYS_CONTEXT *esysContext, 3064 ESYS_TR authHandle, 3065 ESYS_TR nvIndex, 3066 ESYS_TR shandle1, 3067 ESYS_TR shandle2, 3068 ESYS_TR shandle3); 3069 3070 TSS2_RC 3071 Esys_NV_WriteLock_Finish( 3072 ESYS_CONTEXT *esysContext); 3073 3074 /* Table 223 - TPM2_NV_GlobalWriteLock Command */ 3075 3076 TSS2_RC 3077 Esys_NV_GlobalWriteLock( 3078 ESYS_CONTEXT *esysContext, 3079 ESYS_TR authHandle, 3080 ESYS_TR shandle1, 3081 ESYS_TR shandle2, 3082 ESYS_TR shandle3); 3083 3084 TSS2_RC 3085 Esys_NV_GlobalWriteLock_Async( 3086 ESYS_CONTEXT *esysContext, 3087 ESYS_TR authHandle, 3088 ESYS_TR shandle1, 3089 ESYS_TR shandle2, 3090 ESYS_TR shandle3); 3091 3092 TSS2_RC 3093 Esys_NV_GlobalWriteLock_Finish( 3094 ESYS_CONTEXT *esysContext); 3095 3096 /* Table 225 - TPM2_NV_Read Command */ 3097 3098 TSS2_RC 3099 Esys_NV_Read( 3100 ESYS_CONTEXT *esysContext, 3101 ESYS_TR authHandle, 3102 ESYS_TR nvIndex, 3103 ESYS_TR shandle1, 3104 ESYS_TR shandle2, 3105 ESYS_TR shandle3, 3106 UINT16 size, 3107 UINT16 offset, 3108 TPM2B_MAX_NV_BUFFER **data); 3109 3110 TSS2_RC 3111 Esys_NV_Read_Async( 3112 ESYS_CONTEXT *esysContext, 3113 ESYS_TR authHandle, 3114 ESYS_TR nvIndex, 3115 ESYS_TR shandle1, 3116 ESYS_TR shandle2, 3117 ESYS_TR shandle3, 3118 UINT16 size, 3119 UINT16 offset); 3120 3121 TSS2_RC 3122 Esys_NV_Read_Finish( 3123 ESYS_CONTEXT *esysContext, 3124 TPM2B_MAX_NV_BUFFER **data); 3125 3126 /* Table 227 - TPM2_NV_ReadLock Command */ 3127 3128 TSS2_RC 3129 Esys_NV_ReadLock( 3130 ESYS_CONTEXT *esysContext, 3131 ESYS_TR authHandle, 3132 ESYS_TR nvIndex, 3133 ESYS_TR shandle1, 3134 ESYS_TR shandle2, 3135 ESYS_TR shandle3); 3136 3137 TSS2_RC 3138 Esys_NV_ReadLock_Async( 3139 ESYS_CONTEXT *esysContext, 3140 ESYS_TR authHandle, 3141 ESYS_TR nvIndex, 3142 ESYS_TR shandle1, 3143 ESYS_TR shandle2, 3144 ESYS_TR shandle3); 3145 3146 TSS2_RC 3147 Esys_NV_ReadLock_Finish( 3148 ESYS_CONTEXT *esysContext); 3149 3150 /* Table 229 - TPM2_NV_ChangeAuth Command */ 3151 3152 TSS2_RC 3153 Esys_NV_ChangeAuth( 3154 ESYS_CONTEXT *esysContext, 3155 ESYS_TR nvIndex, 3156 ESYS_TR shandle1, 3157 ESYS_TR shandle2, 3158 ESYS_TR shandle3, 3159 const TPM2B_AUTH *newAuth); 3160 3161 TSS2_RC 3162 Esys_NV_ChangeAuth_Async( 3163 ESYS_CONTEXT *esysContext, 3164 ESYS_TR nvIndex, 3165 ESYS_TR shandle1, 3166 ESYS_TR shandle2, 3167 ESYS_TR shandle3, 3168 const TPM2B_AUTH *newAuth); 3169 3170 TSS2_RC 3171 Esys_NV_ChangeAuth_Finish( 3172 ESYS_CONTEXT *esysContext); 3173 3174 /* Table 231 - TPM2_NV_Certify Command */ 3175 3176 TSS2_RC 3177 Esys_NV_Certify( 3178 ESYS_CONTEXT *esysContext, 3179 ESYS_TR signHandle, 3180 ESYS_TR authHandle, 3181 ESYS_TR nvIndex, 3182 ESYS_TR shandle1, 3183 ESYS_TR shandle2, 3184 ESYS_TR shandle3, 3185 const TPM2B_DATA *qualifyingData, 3186 const TPMT_SIG_SCHEME *inScheme, 3187 UINT16 size, 3188 UINT16 offset, 3189 TPM2B_ATTEST **certifyInfo, 3190 TPMT_SIGNATURE **signature); 3191 3192 TSS2_RC 3193 Esys_NV_Certify_Async( 3194 ESYS_CONTEXT *esysContext, 3195 ESYS_TR signHandle, 3196 ESYS_TR authHandle, 3197 ESYS_TR nvIndex, 3198 ESYS_TR shandle1, 3199 ESYS_TR shandle2, 3200 ESYS_TR shandle3, 3201 const TPM2B_DATA *qualifyingData, 3202 const TPMT_SIG_SCHEME *inScheme, 3203 UINT16 size, 3204 UINT16 offset); 3205 3206 TSS2_RC 3207 Esys_NV_Certify_Finish( 3208 ESYS_CONTEXT *esysContext, 3209 TPM2B_ATTEST **certifyInfo, 3210 TPMT_SIGNATURE **signature); 3211 3212 /* Table 233 - TPM2_Vendor_TCG_Test Command */ 3213 3214 TSS2_RC 3215 Esys_Vendor_TCG_Test( 3216 ESYS_CONTEXT *esysContext, 3217 ESYS_TR shandle1, 3218 ESYS_TR shandle2, 3219 ESYS_TR shandle3, 3220 const TPM2B_DATA *inputData, 3221 TPM2B_DATA **outputData); 3222 3223 TSS2_RC 3224 Esys_Vendor_TCG_Test_Async( 3225 ESYS_CONTEXT *esysContext, 3226 ESYS_TR shandle1, 3227 ESYS_TR shandle2, 3228 ESYS_TR shandle3, 3229 const TPM2B_DATA *inputData); 3230 3231 TSS2_RC 3232 Esys_Vendor_TCG_Test_Finish( 3233 ESYS_CONTEXT *esysContext, 3234 TPM2B_DATA **outputData); 3235 3236 /* 3237 * TPM 2.0 ESAPI Helper Functions 3238 */ 3239 void 3240 Esys_Free( 3241 void *__ptr); 3242 3243 TSS2_RC 3244 Esys_GetSysContext( 3245 ESYS_CONTEXT *esys_context, 3246 TSS2_SYS_CONTEXT **sys_context); 3247 3248 #ifdef __cplusplus 3249 } 3250 #endif 3251 3252 #endif /* TSS2_ESYS_H */ 3253