Home | History | Annotate | Download | only in tpm2
      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 
     10 BOOL AreAttributesForParent(OBJECT *parentObject  // IN: parent handle
     11                             );
     12 TPMI_YES_NO ObjectCapGetLoaded(TPMI_DH_OBJECT handle,  // IN: start handle
     13                                UINT32 count,  // IN: count of returned handles
     14                                TPML_HANDLE *handleList  // OUT: list of handle
     15                                );
     16 UINT32 ObjectCapGetTransientAvail(void);
     17 void ObjectCleanupEvict(void);
     18 void ObjectComputeName(TPMT_PUBLIC *publicArea,  // IN: public area of an object
     19                        TPM2B_NAME *name          // OUT: name of the object
     20                        );
     21 void ObjectComputeQualifiedName(
     22     TPM2B_NAME *parentQN,      //   IN: parent's qualified name
     23     TPM_ALG_ID nameAlg,        //   IN: name hash
     24     TPM2B_NAME *name,          //   IN: name of the object
     25     TPM2B_NAME *qualifiedName  //   OUT: qualified name of the object
     26     );
     27 TPM_RC ObjectContextLoad(
     28     OBJECT *object,         // IN: object structure from saved context
     29     TPMI_DH_OBJECT *handle  // OUT: object handle
     30     );
     31 TPM_RC ObjectCreateEventSequence(
     32     TPM2B_AUTH *auth,          // IN: authValue
     33     TPMI_DH_OBJECT *newHandle  // OUT: sequence object handle
     34     );
     35 TPM_RC ObjectCreateHMACSequence(
     36     TPMI_ALG_HASH hashAlg,     // IN: hash algorithm
     37     TPM_HANDLE handle,         // IN: the handle associated with sequence object
     38     TPM2B_AUTH *auth,          // IN: authValue
     39     TPMI_DH_OBJECT *newHandle  // OUT: HMAC sequence object handle
     40     );
     41 TPM_RC ObjectCreateHashSequence(
     42     TPMI_ALG_HASH hashAlg,     // IN: hash algorithm
     43     TPM2B_AUTH *auth,          // IN: authValue
     44     TPMI_DH_OBJECT *newHandle  // OUT: sequence object handle
     45     );
     46 TPMI_RH_HIERARCHY ObjectDataGetHierarchy(OBJECT *object  // IN :object
     47                                          );
     48 BOOL ObjectDataIsStorage(
     49     TPMT_PUBLIC *publicArea  // IN: public area of the object
     50     );
     51 OBJECT *ObjectGet(TPMI_DH_OBJECT handle  // IN: handle of the object
     52                   );
     53 TPMI_RH_HIERARCHY ObjectGetHierarchy(TPMI_DH_OBJECT handle  // IN :object handle
     54                                      );
     55 TPMI_ALG_HASH ObjectGetNameAlg(
     56     TPMI_DH_OBJECT handle  // IN: handle of the object
     57     );
     58 TPM_RC ObjectLoadEvict(TPM_HANDLE *handle,  // IN:OUT: evict object handle. If
     59                                             // success, it will be replace by
     60                                             // the loaded object handle
     61                        TPM_CC commandCode   // IN: the command being processed
     62                        );
     63 void ObjectFlush(TPMI_DH_OBJECT handle  // IN: handle to be freed
     64                  );
     65 void ObjectFlushHierarchy(
     66     TPMI_RH_HIERARCHY hierarchy  // IN: hierarchy to be flush
     67     );
     68 OBJECT *ObjectGet(TPMI_DH_OBJECT handle  // IN: handle of the object
     69                   );
     70 UINT16 ObjectGetName(TPMI_DH_OBJECT handle,  // IN: handle of the object
     71                      NAME *name              // OUT: name of the object
     72                      );
     73 void ObjectGetQualifiedName(
     74     TPMI_DH_OBJECT handle,     // IN: handle of the object
     75     TPM2B_NAME *qualifiedName  // OUT: qualified name of the object
     76     );
     77 BOOL ObjectIsPresent(TPMI_DH_OBJECT handle  // IN: handle to be checked
     78                      );
     79 BOOL ObjectIsSequence(OBJECT *object  // IN: handle to be checked
     80                       );
     81 BOOL ObjectIsStorage(TPMI_DH_OBJECT handle  // IN: object handle
     82                      );
     83 TPM_RC ObjectLoad(
     84     TPMI_RH_HIERARCHY hierarchy,  //   IN: hierarchy to which the object belongs
     85     TPMT_PUBLIC *publicArea,      //   IN: public area
     86     TPMT_SENSITIVE *sensitive,    //   IN: sensitive area (may be null)
     87     TPM2B_NAME *name,             //   IN: object's name (may be null)
     88     TPM_HANDLE parentHandle,      //   IN: handle of parent
     89     BOOL skipChecks,  //   IN: flag to indicate if it is OK to skip consistency
     90                       //   checks.
     91     TPMI_DH_OBJECT *handle  //   OUT: object handle
     92     );
     93 void ObjectStartup(void);
     94 void ObjectTerminateEvent(void);
     95 
     96 #endif  // __TPM2_OBJECT_FP_H
     97