Vadim Bendebury | c4b77e0 | 2015-05-27 15:29:50 -0700 | [diff] [blame] | 1 | /* |
| 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 Bendebury | bbd7900 | 2015-05-31 14:44:07 -0700 | [diff] [blame] | 10 | BOOL AreAttributesForParent( |
| 11 | OBJECT *parentObject // IN: parent handle |
| 12 | ); |
| 13 | TPMI_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 Bendebury | da72506 | 2015-05-31 14:41:18 -0700 | [diff] [blame] | 18 | void ObjectCleanupEvict( |
| 19 | void |
Vadim Bendebury | bbd7900 | 2015-05-31 14:44:07 -0700 | [diff] [blame] | 20 | ); |
Vadim Bendebury | 3743ac1 | 2015-05-29 22:44:14 -0700 | [diff] [blame] | 21 | void ObjectComputeName( |
| 22 | TPMT_PUBLIC *publicArea, // IN: public area of an object |
| 23 | TPM2B_NAME *name // OUT: name of the object |
| 24 | ); |
| 25 | TPM_RC ObjectContextLoad( |
| 26 | OBJECT *object, // IN: object structure from saved context |
| 27 | TPMI_DH_OBJECT *handle // OUT: object handle |
| 28 | ); |
Vadim Bendebury | d60f860 | 2015-05-29 23:03:11 -0700 | [diff] [blame^] | 29 | TPM_RC ObjectCreateHMACSequence( |
| 30 | TPMI_ALG_HASH hashAlg, // IN: hash algorithm |
| 31 | TPM_HANDLE handle, // IN: the handle associated with sequence |
| 32 | // object |
| 33 | TPM2B_AUTH *auth, // IN: authValue |
| 34 | TPMI_DH_OBJECT *newHandle // OUT: HMAC sequence object handle |
| 35 | ); |
Vadim Bendebury | 3743ac1 | 2015-05-29 22:44:14 -0700 | [diff] [blame] | 36 | TPMI_RH_HIERARCHY ObjectDataGetHierarchy( |
| 37 | OBJECT *object // IN :object |
| 38 | ); |
Vadim Bendebury | d60f860 | 2015-05-29 23:03:11 -0700 | [diff] [blame^] | 39 | OBJECT* ObjectGet( |
| 40 | TPMI_DH_OBJECT handle // IN: handle of the object |
| 41 | ); |
Vadim Bendebury | 889ec83 | 2015-05-26 17:11:06 -0700 | [diff] [blame] | 42 | TPM_RC ObjectLoadEvict( |
| 43 | TPM_HANDLE *handle, // IN:OUT: evict object handle. If success, it |
| 44 | // will be replace by the loaded object handle |
| 45 | TPM_CC commandCode // IN: the command being processed |
| 46 | ); |
Vadim Bendebury | c34f4d9 | 2015-05-29 22:56:35 -0700 | [diff] [blame] | 47 | void ObjectFlush( |
| 48 | TPMI_DH_OBJECT handle // IN: handle to be freed |
| 49 | ); |
Vadim Bendebury | 59727bd | 2015-05-28 14:58:08 -0700 | [diff] [blame] | 50 | void ObjectFlushHierarchy( |
| 51 | TPMI_RH_HIERARCHY hierarchy // IN: hierarchy to be flush |
| 52 | ); |
Vadim Bendebury | c4b77e0 | 2015-05-27 15:29:50 -0700 | [diff] [blame] | 53 | OBJECT* ObjectGet( |
| 54 | TPMI_DH_OBJECT handle // IN: handle of the object |
| 55 | ); |
Vadim Bendebury | 1ba1328 | 2015-05-29 22:39:54 -0700 | [diff] [blame] | 56 | UINT16 ObjectGetName( |
| 57 | TPMI_DH_OBJECT handle, // IN: handle of the object |
| 58 | NAME *name // OUT: name of the object |
| 59 | ); |
Vadim Bendebury | b86371b | 2015-05-27 18:16:19 -0700 | [diff] [blame] | 60 | void ObjectGetQualifiedName( |
| 61 | TPMI_DH_OBJECT handle, // IN: handle of the object |
| 62 | TPM2B_NAME *qualifiedName // OUT: qualified name of the object |
| 63 | ); |
Vadim Bendebury | 889ec83 | 2015-05-26 17:11:06 -0700 | [diff] [blame] | 64 | BOOL ObjectIsPresent( |
| 65 | TPMI_DH_OBJECT handle // IN: handle to be checked |
| 66 | ); |
Vadim Bendebury | 3743ac1 | 2015-05-29 22:44:14 -0700 | [diff] [blame] | 67 | BOOL ObjectIsSequence( |
| 68 | OBJECT *object // IN: handle to be checked |
| 69 | ); |
Vadim Bendebury | 30f6dee | 2015-05-29 22:51:10 -0700 | [diff] [blame] | 70 | BOOL ObjectIsStorage( |
| 71 | TPMI_DH_OBJECT handle // IN: object handle |
| 72 | ); |
Vadim Bendebury | df6896c | 2015-05-29 22:48:49 -0700 | [diff] [blame] | 73 | TPM_RC ObjectLoad( |
| 74 | TPMI_RH_HIERARCHY hierarchy, // IN: hierarchy to which the object belongs |
| 75 | TPMT_PUBLIC *publicArea, // IN: public area |
| 76 | TPMT_SENSITIVE *sensitive, // IN: sensitive area (may be null) |
| 77 | TPM2B_NAME *name, // IN: object's name (may be null) |
| 78 | TPM_HANDLE parentHandle, // IN: handle of parent |
| 79 | BOOL skipChecks, // IN: flag to indicate if it is OK to skip |
| 80 | // consistency checks. |
| 81 | TPMI_DH_OBJECT *handle // OUT: object handle |
| 82 | ); |
Vadim Bendebury | da72506 | 2015-05-31 14:41:18 -0700 | [diff] [blame] | 83 | void ObjectTerminateEvent( |
| 84 | void |
| 85 | ); |
Vadim Bendebury | c4b77e0 | 2015-05-27 15:29:50 -0700 | [diff] [blame] | 86 | |
| 87 | #endif // __TPM2_OBJECT_FP_H |