blob: 8be2ef35ca408e0cef21a7faad8564895beb8f60 [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 Bendeburyda725062015-05-31 14:41:18 -070018void ObjectCleanupEvict(
19 void
Vadim Bendeburybbd79002015-05-31 14:44:07 -070020 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070021void ObjectComputeName(
22 TPMT_PUBLIC *publicArea, // IN: public area of an object
23 TPM2B_NAME *name // OUT: name of the object
24);
Vadim Bendebury5f320632015-06-01 10:20:42 -070025void ObjectComputeQualifiedName(
26 TPM2B_NAME *parentQN, // IN: parent's qualified name
27 TPM_ALG_ID nameAlg, // IN: name hash
28 TPM2B_NAME *name, // IN: name of the object
29 TPM2B_NAME *qualifiedName // OUT: qualified name of the object
30 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070031TPM_RC ObjectContextLoad(
32 OBJECT *object, // IN: object structure from saved context
33 TPMI_DH_OBJECT *handle // OUT: object handle
34 );
Vadim Bendeburycddcbfe2015-05-29 23:03:58 -070035TPM_RC ObjectCreateEventSequence(
36 TPM2B_AUTH *auth, // IN: authValue
37 TPMI_DH_OBJECT *newHandle // OUT: sequence object handle
38 );
Vadim Bendeburyd60f8602015-05-29 23:03:11 -070039TPM_RC ObjectCreateHMACSequence(
40 TPMI_ALG_HASH hashAlg, // IN: hash algorithm
41 TPM_HANDLE handle, // IN: the handle associated with sequence
42 // object
43 TPM2B_AUTH *auth, // IN: authValue
44 TPMI_DH_OBJECT *newHandle // OUT: HMAC sequence object handle
45 );
Vadim Bendeburycddcbfe2015-05-29 23:03:58 -070046TPM_RC ObjectCreateHashSequence(
47 TPMI_ALG_HASH hashAlg, // IN: hash algorithm
48 TPM2B_AUTH *auth, // IN: authValue
49 TPMI_DH_OBJECT *newHandle // OUT: sequence object handle
50 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070051TPMI_RH_HIERARCHY ObjectDataGetHierarchy(
52 OBJECT *object // IN :object
53);
Vadim Bendeburyfe7bde42015-06-01 10:55:46 -070054BOOL ObjectDataIsStorage(
55 TPMT_PUBLIC *publicArea // IN: public area of the object
56 );
Vadim Bendeburyd60f8602015-05-29 23:03:11 -070057OBJECT* ObjectGet(
58 TPMI_DH_OBJECT handle // IN: handle of the object
59);
Vadim Bendebury5bb7b9f2015-05-29 23:06:15 -070060TPMI_RH_HIERARCHY ObjectGetHierarchy(
61 TPMI_DH_OBJECT handle // IN :object handle
62 );
Vadim Bendeburyfe7bde42015-06-01 10:55:46 -070063TPMI_ALG_HASH ObjectGetNameAlg(
64 TPMI_DH_OBJECT handle // IN: handle of the object
65 );
Vadim Bendebury889ec832015-05-26 17:11:06 -070066TPM_RC ObjectLoadEvict(
67 TPM_HANDLE *handle, // IN:OUT: evict object handle. If success, it
68 // will be replace by the loaded object handle
69 TPM_CC commandCode // IN: the command being processed
70 );
Vadim Bendeburyc34f4d92015-05-29 22:56:35 -070071void ObjectFlush(
72 TPMI_DH_OBJECT handle // IN: handle to be freed
73);
Vadim Bendebury59727bd2015-05-28 14:58:08 -070074void ObjectFlushHierarchy(
75 TPMI_RH_HIERARCHY hierarchy // IN: hierarchy to be flush
76);
Vadim Bendeburyc4b77e02015-05-27 15:29:50 -070077OBJECT* ObjectGet(
78 TPMI_DH_OBJECT handle // IN: handle of the object
79);
Vadim Bendebury1ba13282015-05-29 22:39:54 -070080UINT16 ObjectGetName(
81 TPMI_DH_OBJECT handle, // IN: handle of the object
82 NAME *name // OUT: name of the object
83);
Vadim Bendeburyb86371b2015-05-27 18:16:19 -070084void ObjectGetQualifiedName(
85 TPMI_DH_OBJECT handle, // IN: handle of the object
86 TPM2B_NAME *qualifiedName // OUT: qualified name of the object
87);
Vadim Bendebury889ec832015-05-26 17:11:06 -070088BOOL ObjectIsPresent(
89 TPMI_DH_OBJECT handle // IN: handle to be checked
90 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070091BOOL ObjectIsSequence(
92 OBJECT *object // IN: handle to be checked
93 );
Vadim Bendebury30f6dee2015-05-29 22:51:10 -070094BOOL ObjectIsStorage(
95 TPMI_DH_OBJECT handle // IN: object handle
96 );
Vadim Bendeburydf6896c2015-05-29 22:48:49 -070097TPM_RC ObjectLoad(
98 TPMI_RH_HIERARCHY hierarchy, // IN: hierarchy to which the object belongs
99 TPMT_PUBLIC *publicArea, // IN: public area
100 TPMT_SENSITIVE *sensitive, // IN: sensitive area (may be null)
101 TPM2B_NAME *name, // IN: object's name (may be null)
102 TPM_HANDLE parentHandle, // IN: handle of parent
103 BOOL skipChecks, // IN: flag to indicate if it is OK to skip
104 // consistency checks.
105 TPMI_DH_OBJECT *handle // OUT: object handle
106);
Vadim Bendeburyda725062015-05-31 14:41:18 -0700107void ObjectTerminateEvent(
108 void
109);
Vadim Bendeburyc4b77e02015-05-27 15:29:50 -0700110
111#endif // __TPM2_OBJECT_FP_H