• 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_CONFIG_H
7 #define IFAPI_CONFIG_H
8 
9 #include <stdint.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include "tss2_tpm2_types.h"
13 #include "ifapi_io.h"
14 
15 #define ENV_FAPI_CONFIG "TSS2_FAPICONF"
16 
17 /**
18  * Type for storing FAPI configuration
19  */
20 typedef struct {
21     /** Path for profile directory */
22     char                *profile_dir;
23     /** Directory storing NV objects */
24     char                *user_dir;
25     /** Directory storing key and NV objects */
26     char                *keystore_dir;
27     /** Name the used profile */
28     char                *profile_name;
29     /** The used tcti interface */
30     char                *tcti;
31     /** The directory for event logs */
32     char                *log_dir;
33     /** The PCRs used by IMA etc. */
34     TPML_PCR_SELECTION   system_pcrs;
35     /** Fingerprint of EK */
36     TPMT_HA              ek_fingerprint;
37     /* URL for EC certificate */
38     char                *ek_cert_file;
39      /* Switch whether certificate validation will done */
40     TPMI_YES_NO         ek_cert_less;
41     /** Certificate service for Intel TPMs */
42     char                *intel_cert_service;
43 
44 } IFAPI_CONFIG;
45 
46 TSS2_RC
47 ifapi_config_initialize_async(
48     IFAPI_IO            *io
49         );
50 
51 TSS2_RC
52 ifapi_config_initialize_finish(
53     IFAPI_IO            *io,
54     IFAPI_CONFIG        *config
55     );
56 
57 #endif /* IFAPI_CONFIG_H */
58