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