1 /********************************************************************************/
2 /*										*/
3 /*		TPM2_SetPrimaryPolicy Command Header   				*/
4 /*			     Written by Ken Goldman				*/
5 /*		       IBM Thomas J. Watson Research Center			*/
6 /*										*/
7 /*  Licenses and Notices							*/
8 /*										*/
9 /*  1. Copyright Licenses:							*/
10 /*										*/
11 /*  - Trusted Computing Group (TCG) grants to the user of the source code in	*/
12 /*    this specification (the "Source Code") a worldwide, irrevocable, 		*/
13 /*    nonexclusive, royalty free, copyright license to reproduce, create 	*/
14 /*    derivative works, distribute, display and perform the Source Code and	*/
15 /*    derivative works thereof, and to grant others the rights granted herein.	*/
16 /*										*/
17 /*  - The TCG grants to the user of the other parts of the specification 	*/
18 /*    (other than the Source Code) the rights to reproduce, distribute, 	*/
19 /*    display, and perform the specification solely for the purpose of 		*/
20 /*    developing products based on such documents.				*/
21 /*										*/
22 /*  2. Source Code Distribution Conditions:					*/
23 /*										*/
24 /*  - Redistributions of Source Code must retain the above copyright licenses, 	*/
25 /*    this list of conditions and the following disclaimers.			*/
26 /*										*/
27 /*  - Redistributions in binary form must reproduce the above copyright 	*/
28 /*    licenses, this list of conditions	and the following disclaimers in the 	*/
29 /*    documentation and/or other materials provided with the distribution.	*/
30 /*										*/
31 /*  3. Disclaimers:								*/
32 /*										*/
33 /*  - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF	*/
34 /*  LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH	*/
35 /*  RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES)	*/
36 /*  THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE.		*/
37 /*  Contact TCG Administration (admin@trustedcomputinggroup.org) for 		*/
38 /*  information on specification licensing rights available through TCG 	*/
39 /*  membership agreements.							*/
40 /*										*/
41 /*  - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED 	*/
42 /*    WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR 	*/
43 /*    FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR 		*/
44 /*    NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY 		*/
45 /*    OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.		*/
46 /*										*/
47 /*  - Without limitation, TCG and its members and licensors disclaim all 	*/
48 /*    liability, including liability for infringement of any proprietary 	*/
49 /*    rights, relating to use of information in this specification and to the	*/
50 /*    implementation of this specification, and TCG disclaims all liability for	*/
51 /*    cost of procurement of substitute goods or services, lost profits, loss 	*/
52 /*    of use, loss of data or any incidental, consequential, direct, indirect, 	*/
53 /*    or special damages, whether under contract, tort, warranty or otherwise, 	*/
54 /*    arising in any way out of use or reliance upon this specification or any 	*/
55 /*    information herein.							*/
56 /*										*/
57 /*  (c) Copyright IBM Corp. and others, 2012 - 2019				*/
58 /*										*/
59 /********************************************************************************/
60 
61 #ifndef SETPRIMARYPOLICY_FP_H
62 #define SETPRIMARYPOLICY_FP_H
63 
64 typedef struct {
65     TPMI_RH_HIERARCHY_POLICY	authHandle;
66     TPM2B_DIGEST		authPolicy;
67     TPMI_ALG_HASH		hashAlg;
68 } SetPrimaryPolicy_In;
69 
70 #define RC_SetPrimaryPolicy_authHandle	(TPM_RC_H + TPM_RC_1)
71 #define RC_SetPrimaryPolicy_authPolicy 	(TPM_RC_P + TPM_RC_1)
72 #define RC_SetPrimaryPolicy_hashAlg	(TPM_RC_P + TPM_RC_2)
73 
74 TPM_RC
75 TPM2_SetPrimaryPolicy(
76 		      SetPrimaryPolicy_In     *in             // IN: input parameter list
77 		      );
78 
79 #endif
80