]> git.ipfire.org Git - thirdparty/strongswan.git/blame - src/libimcv/plugins/imc_attestation/imc_attestation_state.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libimcv / plugins / imc_attestation / imc_attestation_state.h
CommitLineData
4a492a8d 1/*
24a5af8e 2 * Copyright (C) 2011 Sansar Choinyambuu
19ef2aec
TB
3 *
4 * Copyright (C) secunet Security Networks AG
4a492a8d
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/**
11adf114 18 * @defgroup imc_attestation imc_attestation
d6fb2cc6 19 * @ingroup libimcv_plugins
4a492a8d
AS
20 *
21 * @defgroup imc_attestation_state_t imc_attestation_state
11adf114 22 * @{ @ingroup imc_attestation
4a492a8d
AS
23 */
24
25#ifndef IMC_ATTESTATION_STATE_H_
26#define IMC_ATTESTATION_STATE_H_
27
28#include <imc/imc_state.h>
3ed943c3 29#include <pts/pts.h>
af8354da 30#include <pts/components/pts_component.h>
cb3ecd5a 31#include <pts/components/pts_comp_evidence.h>
4a492a8d
AS
32#include <library.h>
33
34typedef struct imc_attestation_state_t imc_attestation_state_t;
35
36/**
37 * Internal state of an imc_attestation_t connection instance
38 */
39struct imc_attestation_state_t {
40
41 /**
42 * imc_state_t interface
43 */
44 imc_state_t interface;
8a2482c7
AS
45
46 /**
47 * Get the PTS object
48 *
49 * @return PTS object
50 */
51 pts_t* (*get_pts)(imc_attestation_state_t *this);
52
af8354da
AS
53 /**
54 * Create and add an entry to the list of Functional Components
55 *
56 * @param name Component Functional Name
57 * @param depth Sub-component Depth
58 * @return created functional component instance or NULL
59 */
60 pts_component_t* (*create_component)(imc_attestation_state_t *this,
b12c53ce 61 pts_comp_func_name_t *name, uint32_t depth);
af8354da 62
cb3ecd5a 63 /**
ab957aac 64 * Add an entry to the Component Evidence cache list
cb3ecd5a 65 *
ab957aac 66 * @param evid Component Evidence entry
cb3ecd5a 67 */
ab957aac 68 void (*add_evidence)(imc_attestation_state_t *this, pts_comp_evidence_t *evid);
cb3ecd5a 69
cb3ecd5a 70 /**
ab957aac 71 * Removes next entry from the Component Evidence cache list and returns it
cb3ecd5a 72 *
ab957aac 73 * @param evid Next Component Evidence entry
19c956b6 74 * @return TRUE if next entry is available
cb3ecd5a 75 */
ab957aac 76 bool (*next_evidence)(imc_attestation_state_t *this, pts_comp_evidence_t** evid);
cb3ecd5a 77
4a492a8d
AS
78};
79
80/**
81 * Create an imc_attestation_state_t instance
82 *
8a2482c7 83 * @param id connection ID
4a492a8d
AS
84 */
85imc_state_t* imc_attestation_state_create(TNC_ConnectionID id);
86
87#endif /** IMC_ATTESTATION_STATE_H_ @}*/