]>
Commit | Line | Data |
---|---|---|
48064815 | 1 | /* |
d647a8f9 | 2 | * Copyright (C) 2014-2020 Andreas Steffen |
48064815 AS |
3 | * HSR Hochschule fuer Technik Rapperswil |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU General Public License as published by the | |
7 | * Free Software Foundation; either version 2 of the License, or (at your | |
8 | * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, but | |
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
12 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 | * for more details. | |
14 | */ | |
15 | ||
16 | /** | |
17 | * @defgroup pts_ima_bios_list pts_ima_bios_list | |
18 | * @{ @ingroup pts | |
19 | */ | |
20 | ||
21 | #ifndef PTS_IMA_BIOS_LIST_H_ | |
22 | #define PTS_IMA_BIOS_LIST_H_ | |
23 | ||
24 | #include <time.h> | |
25 | ||
26 | #include <library.h> | |
d647a8f9 | 27 | #include <tpm_tss.h> |
48064815 AS |
28 | |
29 | typedef struct pts_ima_bios_list_t pts_ima_bios_list_t; | |
30 | ||
31 | /** | |
32 | * Class retrieving Linux IMA BIOS measurements | |
33 | * | |
34 | */ | |
35 | struct pts_ima_bios_list_t { | |
36 | ||
37 | /** | |
38 | * Get the time the BIOS measurements were taken | |
39 | * | |
40 | * @return Measurement time | |
41 | */ | |
42 | time_t (*get_time)(pts_ima_bios_list_t *this); | |
43 | ||
44 | /** | |
45 | * Get the number of non-processed BIOS measurements | |
46 | * | |
47 | * @return Number of measurements left | |
48 | */ | |
49 | int (*get_count)(pts_ima_bios_list_t *this); | |
50 | ||
51 | /** | |
52 | * Get the next BIOS measurement and remove it from the list | |
53 | * | |
54 | * @param pcr PCR where the measurement was extended into | |
55 | * @param measurement Measurement hash | |
56 | * @return Return code | |
57 | */ | |
58 | status_t (*get_next)(pts_ima_bios_list_t *this, uint32_t *pcr, | |
59 | chunk_t *measurement); | |
60 | ||
61 | /** | |
62 | * Destroys a pts_ima_bios_list_t object. | |
63 | */ | |
64 | void (*destroy)(pts_ima_bios_list_t *this); | |
65 | ||
66 | }; | |
67 | ||
68 | /** | |
69 | * Create a PTS IMA BIOS measurement object | |
70 | * | |
d647a8f9 | 71 | * @param tpm TPM object |
48064815 AS |
72 | * @param file Pathname pointing to the BIOS measurements |
73 | */ | |
d647a8f9 | 74 | pts_ima_bios_list_t* pts_ima_bios_list_create(tpm_tss_t *tpm, char *file); |
48064815 AS |
75 | |
76 | #endif /** PTS_IMA_BIOS_LIST_H_ @}*/ |