aboutsummaryrefslogtreecommitdiff
path: root/Object_fp.h
blob: 37756b876bc62224d4dbdebb6b9d52b0c9fc156e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
 * Copyright 2015 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef __TPM2_OBJECT_FP_H
#define __TPM2_OBJECT_FP_H

BOOL AreAttributesForParent(OBJECT *parentObject  // IN: parent handle
                            );
TPMI_YES_NO ObjectCapGetLoaded(TPMI_DH_OBJECT handle,  // IN: start handle
                               UINT32 count,  // IN: count of returned handles
                               TPML_HANDLE *handleList  // OUT: list of handle
                               );
UINT32 ObjectCapGetTransientAvail(void);
void ObjectCleanupEvict(void);
void ObjectComputeName(TPMT_PUBLIC *publicArea,  // IN: public area of an object
                       TPM2B_NAME *name          // OUT: name of the object
                       );
void ObjectComputeQualifiedName(
    TPM2B_NAME *parentQN,      //   IN: parent's qualified name
    TPM_ALG_ID nameAlg,        //   IN: name hash
    TPM2B_NAME *name,          //   IN: name of the object
    TPM2B_NAME *qualifiedName  //   OUT: qualified name of the object
    );
TPM_RC ObjectContextLoad(
    OBJECT *object,         // IN: object structure from saved context
    TPMI_DH_OBJECT *handle  // OUT: object handle
    );
TPM_RC ObjectCreateEventSequence(
    TPM2B_AUTH *auth,          // IN: authValue
    TPMI_DH_OBJECT *newHandle  // OUT: sequence object handle
    );
TPM_RC ObjectCreateHMACSequence(
    TPMI_ALG_HASH hashAlg,     // IN: hash algorithm
    TPM_HANDLE handle,         // IN: the handle associated with sequence object
    TPM2B_AUTH *auth,          // IN: authValue
    TPMI_DH_OBJECT *newHandle  // OUT: HMAC sequence object handle
    );
TPM_RC ObjectCreateHashSequence(
    TPMI_ALG_HASH hashAlg,     // IN: hash algorithm
    TPM2B_AUTH *auth,          // IN: authValue
    TPMI_DH_OBJECT *newHandle  // OUT: sequence object handle
    );
TPMI_RH_HIERARCHY ObjectDataGetHierarchy(OBJECT *object  // IN :object
                                         );
BOOL ObjectDataIsStorage(
    TPMT_PUBLIC *publicArea  // IN: public area of the object
    );
OBJECT *ObjectGet(TPMI_DH_OBJECT handle  // IN: handle of the object
                  );
TPMI_RH_HIERARCHY ObjectGetHierarchy(TPMI_DH_OBJECT handle  // IN :object handle
                                     );
TPMI_ALG_HASH ObjectGetNameAlg(
    TPMI_DH_OBJECT handle  // IN: handle of the object
    );
TPM_RC ObjectLoadEvict(TPM_HANDLE *handle,  // IN:OUT: evict object handle. If
                                            // success, it will be replace by
                                            // the loaded object handle
                       TPM_CC commandCode   // IN: the command being processed
                       );
void ObjectFlush(TPMI_DH_OBJECT handle  // IN: handle to be freed
                 );
void ObjectFlushHierarchy(
    TPMI_RH_HIERARCHY hierarchy  // IN: hierarchy to be flush
    );
OBJECT *ObjectGet(TPMI_DH_OBJECT handle  // IN: handle of the object
                  );
UINT16 ObjectGetName(TPMI_DH_OBJECT handle,  // IN: handle of the object
                     NAME *name              // OUT: name of the object
                     );
void ObjectGetQualifiedName(
    TPMI_DH_OBJECT handle,     // IN: handle of the object
    TPM2B_NAME *qualifiedName  // OUT: qualified name of the object
    );
BOOL ObjectIsPresent(TPMI_DH_OBJECT handle  // IN: handle to be checked
                     );
BOOL ObjectIsSequence(OBJECT *object  // IN: handle to be checked
                      );
BOOL ObjectIsStorage(TPMI_DH_OBJECT handle  // IN: object handle
                     );
TPM_RC ObjectLoad(
    TPMI_RH_HIERARCHY hierarchy,  //   IN: hierarchy to which the object belongs
    TPMT_PUBLIC *publicArea,      //   IN: public area
    TPMT_SENSITIVE *sensitive,    //   IN: sensitive area (may be null)
    TPM2B_NAME *name,             //   IN: object's name (may be null)
    TPM_HANDLE parentHandle,      //   IN: handle of parent
    BOOL skipChecks,  //   IN: flag to indicate if it is OK to skip consistency
                      //   checks.
    TPMI_DH_OBJECT *handle  //   OUT: object handle
    );
void ObjectStartup(void);
void ObjectTerminateEvent(void);

#endif  // __TPM2_OBJECT_FP_H