• 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 
7 #ifndef IFAPI_POLICY_STORE_H
8 #define IFAPI_POLICY_STORE_H
9 
10 #include <stdlib.h>
11 
12 #include "tss2_common.h"
13 #include "tss2_tpm2_types.h"
14 #include "fapi_types.h"
15 #include "ifapi_policy_types.h"
16 
17 typedef struct IFAPI_POLICY_STORE {
18     char *policydir;
19 } IFAPI_POLICY_STORE;
20 
21 TSS2_RC
22 ifapi_policy_delete(
23      IFAPI_POLICY_STORE *pstore,
24      char *path);
25 
26 TSS2_RC
27 ifapi_policy_store_initialize(
28     IFAPI_POLICY_STORE *pstore,
29     const char *config_policydir);
30 
31 TSS2_RC
32 ifapi_policy_store_load_async(
33     IFAPI_POLICY_STORE *pstore,
34     IFAPI_IO *io,
35     const char *path);
36 
37 TSS2_RC
38 ifapi_policy_store_load_finish(
39     IFAPI_POLICY_STORE *pstore,
40     IFAPI_IO *io,
41     TPMS_POLICY *policy);
42 
43 TSS2_RC
44 ifapi_policy_store_store_async(
45     IFAPI_POLICY_STORE *pstore,
46     IFAPI_IO *io,
47     const char *path,
48     const TPMS_POLICY *policy);
49 
50 TSS2_RC
51 ifapi_policy_store_store_finish(
52     IFAPI_POLICY_STORE *pstore,
53     IFAPI_IO *io);
54 
55 #endif /* IFAPI_POLICY_STORE_H */
56