blob: b5def3463d48f74d4ed4ee3dc58d5b768389e8ba [file] [log] [blame]
Vadim Bendeburyc4b77e02015-05-27 15:29:50 -07001/*
2 * Copyright 2015 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7#ifndef __TPM2_OBJECT_FP_H
8#define __TPM2_OBJECT_FP_H
9
Vadim Bendeburybbd79002015-05-31 14:44:07 -070010BOOL AreAttributesForParent(
11 OBJECT *parentObject // IN: parent handle
12 );
13TPMI_YES_NO ObjectCapGetLoaded(
14 TPMI_DH_OBJECT handle, // IN: start handle
15 UINT32 count, // IN: count of returned handles
16 TPML_HANDLE *handleList // OUT: list of handle
17);
Vadim Bendebury4a0a7f62015-06-01 17:07:46 -070018UINT32 ObjectCapGetTransientAvail(
19 void
20 );
Vadim Bendeburyda725062015-05-31 14:41:18 -070021void ObjectCleanupEvict(
22 void
Vadim Bendeburybbd79002015-05-31 14:44:07 -070023 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070024void ObjectComputeName(
25 TPMT_PUBLIC *publicArea, // IN: public area of an object
26 TPM2B_NAME *name // OUT: name of the object
27);
Vadim Bendebury5f320632015-06-01 10:20:42 -070028void ObjectComputeQualifiedName(
29 TPM2B_NAME *parentQN, // IN: parent's qualified name
30 TPM_ALG_ID nameAlg, // IN: name hash
31 TPM2B_NAME *name, // IN: name of the object
32 TPM2B_NAME *qualifiedName // OUT: qualified name of the object
33 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070034TPM_RC ObjectContextLoad(
35 OBJECT *object, // IN: object structure from saved context
36 TPMI_DH_OBJECT *handle // OUT: object handle
37 );
Vadim Bendeburycddcbfe2015-05-29 23:03:58 -070038TPM_RC ObjectCreateEventSequence(
39 TPM2B_AUTH *auth, // IN: authValue
40 TPMI_DH_OBJECT *newHandle // OUT: sequence object handle
41 );
Vadim Bendeburyd60f8602015-05-29 23:03:11 -070042TPM_RC ObjectCreateHMACSequence(
43 TPMI_ALG_HASH hashAlg, // IN: hash algorithm
44 TPM_HANDLE handle, // IN: the handle associated with sequence
45 // object
46 TPM2B_AUTH *auth, // IN: authValue
47 TPMI_DH_OBJECT *newHandle // OUT: HMAC sequence object handle
48 );
Vadim Bendeburycddcbfe2015-05-29 23:03:58 -070049TPM_RC ObjectCreateHashSequence(
50 TPMI_ALG_HASH hashAlg, // IN: hash algorithm
51 TPM2B_AUTH *auth, // IN: authValue
52 TPMI_DH_OBJECT *newHandle // OUT: sequence object handle
53 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070054TPMI_RH_HIERARCHY ObjectDataGetHierarchy(
55 OBJECT *object // IN :object
56);
Vadim Bendeburyfe7bde42015-06-01 10:55:46 -070057BOOL ObjectDataIsStorage(
58 TPMT_PUBLIC *publicArea // IN: public area of the object
59 );
Vadim Bendeburyd60f8602015-05-29 23:03:11 -070060OBJECT* ObjectGet(
61 TPMI_DH_OBJECT handle // IN: handle of the object
62);
Vadim Bendebury5bb7b9f2015-05-29 23:06:15 -070063TPMI_RH_HIERARCHY ObjectGetHierarchy(
64 TPMI_DH_OBJECT handle // IN :object handle
65 );
Vadim Bendeburyfe7bde42015-06-01 10:55:46 -070066TPMI_ALG_HASH ObjectGetNameAlg(
67 TPMI_DH_OBJECT handle // IN: handle of the object
68 );
Vadim Bendebury889ec832015-05-26 17:11:06 -070069TPM_RC ObjectLoadEvict(
70 TPM_HANDLE *handle, // IN:OUT: evict object handle. If success, it
71 // will be replace by the loaded object handle
72 TPM_CC commandCode // IN: the command being processed
73 );
Vadim Bendeburyc34f4d92015-05-29 22:56:35 -070074void ObjectFlush(
75 TPMI_DH_OBJECT handle // IN: handle to be freed
76);
Vadim Bendebury59727bd2015-05-28 14:58:08 -070077void ObjectFlushHierarchy(
78 TPMI_RH_HIERARCHY hierarchy // IN: hierarchy to be flush
79);
Vadim Bendeburyc4b77e02015-05-27 15:29:50 -070080OBJECT* ObjectGet(
81 TPMI_DH_OBJECT handle // IN: handle of the object
82);
Vadim Bendebury1ba13282015-05-29 22:39:54 -070083UINT16 ObjectGetName(
84 TPMI_DH_OBJECT handle, // IN: handle of the object
85 NAME *name // OUT: name of the object
86);
Vadim Bendeburyb86371b2015-05-27 18:16:19 -070087void ObjectGetQualifiedName(
88 TPMI_DH_OBJECT handle, // IN: handle of the object
89 TPM2B_NAME *qualifiedName // OUT: qualified name of the object
90);
Vadim Bendebury889ec832015-05-26 17:11:06 -070091BOOL ObjectIsPresent(
92 TPMI_DH_OBJECT handle // IN: handle to be checked
93 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070094BOOL ObjectIsSequence(
95 OBJECT *object // IN: handle to be checked
96 );
Vadim Bendebury30f6dee2015-05-29 22:51:10 -070097BOOL ObjectIsStorage(
98 TPMI_DH_OBJECT handle // IN: object handle
99 );
Vadim Bendeburydf6896c2015-05-29 22:48:49 -0700100TPM_RC ObjectLoad(
101 TPMI_RH_HIERARCHY hierarchy, // IN: hierarchy to which the object belongs
102 TPMT_PUBLIC *publicArea, // IN: public area
103 TPMT_SENSITIVE *sensitive, // IN: sensitive area (may be null)
104 TPM2B_NAME *name, // IN: object's name (may be null)
105 TPM_HANDLE parentHandle, // IN: handle of parent
106 BOOL skipChecks, // IN: flag to indicate if it is OK to skip
107 // consistency checks.
108 TPMI_DH_OBJECT *handle // OUT: object handle
109);
Vadim Bendeburyff6d8432015-06-01 19:18:37 -0700110void ObjectStartup(
111 void
112 );
Vadim Bendeburyda725062015-05-31 14:41:18 -0700113void ObjectTerminateEvent(
114 void
115);
Vadim Bendeburyc4b77e02015-05-27 15:29:50 -0700116
117#endif // __TPM2_OBJECT_FP_H