• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*******************************************************************************
3  * Copyright 2018-2019, Fraunhofer SIT sponsored by Infineon Technologies AG
4  * All rights reserved.
5  ******************************************************************************/
6 #ifndef IFAPI_POLICY_JSON_SERIALIZE_H
7 #define IFAPI_POLICY_JSON_SERIALIZE_H
8 
9 #include <stdbool.h>
10 #include <json-c/json.h>
11 #include <json-c/json_util.h>
12 
13 #include "tss2_tpm2_types.h"
14 #include "fapi_int.h"
15 
16 TSS2_RC
17 ifapi_json_TPMI_POLICYTYPE_serialize(const TPMI_POLICYTYPE in,
18                                      json_object **jso);
19 
20 TSS2_RC
21 ifapi_json_TPMI_POLICYTYPE_serialize_txt(const TPMI_POLICYTYPE in,
22         json_object **jso);
23 
24 TSS2_RC
25 ifapi_json_TPMS_POLICYSIGNED_serialize(const TPMS_POLICYSIGNED *in,
26                                        json_object **jso);
27 
28 TSS2_RC
29 ifapi_json_TPMS_POLICYSECRET_serialize(const TPMS_POLICYSECRET *in,
30                                        json_object **jso);
31 
32 TSS2_RC
33 ifapi_json_TPMS_POLICYLOCALITY_serialize(const TPMS_POLICYLOCALITY *in,
34         json_object **jso);
35 
36 TSS2_RC
37 ifapi_json_TPMS_POLICYNV_serialize(const TPMS_POLICYNV *in, json_object **jso);
38 
39 TSS2_RC
40 ifapi_json_TPMS_POLICYCOUNTERTIMER_serialize(const TPMS_POLICYCOUNTERTIMER *in,
41         json_object **jso);
42 
43 TSS2_RC
44 ifapi_json_TPMS_POLICYCOMMANDCODE_serialize(const TPMS_POLICYCOMMANDCODE *in,
45         json_object **jso);
46 
47 TSS2_RC
48 ifapi_json_TPMS_POLICYPHYSICALPRESENCE_serialize(const
49         TPMS_POLICYPHYSICALPRESENCE *in, json_object **jso);
50 
51 TSS2_RC
52 ifapi_json_TPMS_POLICYCPHASH_serialize(const TPMS_POLICYCPHASH *in,
53                                        json_object **jso);
54 
55 TSS2_RC
56 ifapi_json_TPMS_POLICYNAMEHASH_serialize(const TPMS_POLICYNAMEHASH *in,
57         json_object **jso);
58 
59 TSS2_RC
60 ifapi_json_TPMS_POLICYDUPLICATIONSELECT_serialize(const
61         TPMS_POLICYDUPLICATIONSELECT *in, json_object **jso);
62 
63 TSS2_RC
64 ifapi_json_TPMS_POLICYAUTHORIZE_serialize(const TPMS_POLICYAUTHORIZE *in,
65         json_object **jso);
66 
67 TSS2_RC
68 ifapi_json_TPMS_POLICYAUTHVALUE_serialize(const TPMS_POLICYAUTHVALUE *in,
69         json_object **jso);
70 
71 TSS2_RC
72 ifapi_json_TPMS_POLICYPASSWORD_serialize(const TPMS_POLICYPASSWORD *in,
73         json_object **jso);
74 
75 TSS2_RC
76 ifapi_json_TPMS_POLICYNVWRITTEN_serialize(const TPMS_POLICYNVWRITTEN *in,
77         json_object **jso);
78 
79 TSS2_RC
80 ifapi_json_TPMS_POLICYTEMPLATE_serialize(const TPMS_POLICYTEMPLATE *in,
81         json_object **jso);
82 
83 TSS2_RC
84 ifapi_json_TPMS_POLICYAUTHORIZENV_serialize(const TPMS_POLICYAUTHORIZENV *in,
85         json_object **jso);
86 
87 TSS2_RC
88 ifapi_json_TPMS_POLICYACTION_serialize(const TPMS_POLICYACTION *in,
89                                        json_object **jso);
90 
91 TSS2_RC
92 ifapi_json_TPMS_PCRVALUE_serialize(const TPMS_PCRVALUE *in, json_object **jso);
93 
94 TSS2_RC
95 ifapi_json_TPML_PCRVALUES_serialize(const TPML_PCRVALUES *in,
96                                     json_object **jso);
97 
98 TSS2_RC
99 ifapi_json_TPMS_POLICYPCR_serialize(const TPMS_POLICYPCR *in,
100                                     json_object **jso);
101 
102 TSS2_RC
103 ifapi_json_TPMS_POLICYAUTHORIZATION_serialize(const TPMS_POLICYAUTHORIZATION
104         *in, json_object **jso);
105 
106 TSS2_RC
107 ifapi_json_TPML_POLICYAUTHORIZATIONS_serialize(const TPML_POLICYAUTHORIZATIONS
108         *in, json_object **jso);
109 
110 TSS2_RC
111 ifapi_json_TPMS_POLICYBRANCH_serialize(const TPMS_POLICYBRANCH *in,
112                                        json_object **jso);
113 
114 TSS2_RC
115 ifapi_json_TPML_POLICYBRANCHES_serialize(const TPML_POLICYBRANCHES *in,
116         json_object **jso);
117 
118 TSS2_RC
119 ifapi_json_TPMS_POLICYOR_serialize(const TPMS_POLICYOR *in, json_object **jso);
120 
121 TSS2_RC
122 ifapi_json_TPMU_POLICYELEMENT_serialize(const TPMU_POLICYELEMENT *in,
123                                         UINT32 selector, json_object **jso);
124 
125 TSS2_RC
126 ifapi_json_TPMT_POLICYELEMENT_serialize(const TPMT_POLICYELEMENT *in,
127                                         json_object **jso);
128 
129 TSS2_RC
130 ifapi_json_TPML_POLICYELEMENTS_serialize(const TPML_POLICYELEMENTS *in,
131         json_object **jso);
132 
133 TSS2_RC
134 ifapi_json_TPMS_POLICY_serialize(const TPMS_POLICY *in,
135         json_object **jso);
136 
137 #endif /* IFAPI_POLICY_JSON_SERIALIZE_H */
138