blob: 1b5bb58c8b16a8932ec76bdecfec5139f0e2b205 [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);
25TPM_RC ObjectContextLoad(
26 OBJECT *object, // IN: object structure from saved context
27 TPMI_DH_OBJECT *handle // OUT: object handle
28 );
29TPMI_RH_HIERARCHY ObjectDataGetHierarchy(
30 OBJECT *object // IN :object
31);
Vadim Bendebury889ec832015-05-26 17:11:06 -070032TPM_RC ObjectLoadEvict(
33 TPM_HANDLE *handle, // IN:OUT: evict object handle. If success, it
34 // will be replace by the loaded object handle
35 TPM_CC commandCode // IN: the command being processed
36 );
Vadim Bendeburyc34f4d92015-05-29 22:56:35 -070037void ObjectFlush(
38 TPMI_DH_OBJECT handle // IN: handle to be freed
39);
Vadim Bendebury59727bd2015-05-28 14:58:08 -070040void ObjectFlushHierarchy(
41 TPMI_RH_HIERARCHY hierarchy // IN: hierarchy to be flush
42);
Vadim Bendeburyc4b77e02015-05-27 15:29:50 -070043OBJECT* ObjectGet(
44 TPMI_DH_OBJECT handle // IN: handle of the object
45);
Vadim Bendebury1ba13282015-05-29 22:39:54 -070046UINT16 ObjectGetName(
47 TPMI_DH_OBJECT handle, // IN: handle of the object
48 NAME *name // OUT: name of the object
49);
Vadim Bendeburyb86371b2015-05-27 18:16:19 -070050void ObjectGetQualifiedName(
51 TPMI_DH_OBJECT handle, // IN: handle of the object
52 TPM2B_NAME *qualifiedName // OUT: qualified name of the object
53);
Vadim Bendebury889ec832015-05-26 17:11:06 -070054BOOL ObjectIsPresent(
55 TPMI_DH_OBJECT handle // IN: handle to be checked
56 );
Vadim Bendebury3743ac12015-05-29 22:44:14 -070057BOOL ObjectIsSequence(
58 OBJECT *object // IN: handle to be checked
59 );
Vadim Bendebury30f6dee2015-05-29 22:51:10 -070060BOOL ObjectIsStorage(
61 TPMI_DH_OBJECT handle // IN: object handle
62 );
Vadim Bendeburydf6896c2015-05-29 22:48:49 -070063TPM_RC ObjectLoad(
64 TPMI_RH_HIERARCHY hierarchy, // IN: hierarchy to which the object belongs
65 TPMT_PUBLIC *publicArea, // IN: public area
66 TPMT_SENSITIVE *sensitive, // IN: sensitive area (may be null)
67 TPM2B_NAME *name, // IN: object's name (may be null)
68 TPM_HANDLE parentHandle, // IN: handle of parent
69 BOOL skipChecks, // IN: flag to indicate if it is OK to skip
70 // consistency checks.
71 TPMI_DH_OBJECT *handle // OUT: object handle
72);
Vadim Bendeburyda725062015-05-31 14:41:18 -070073void ObjectTerminateEvent(
74 void
75);
Vadim Bendeburyc4b77e02015-05-27 15:29:50 -070076
77#endif // __TPM2_OBJECT_FP_H