Annotation of embedaddon/strongswan/src/libimcv/tcg/pts/tcg_pts_attr_dh_nonce_params_req.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2011 Sansar Choinyambuu
3: * Copyright (C) 2014 Andreas Steffen
4: * HSR Hochschule fuer Technik Rapperswil
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 tcg_pts_attr_dh_nonce_params_req tcg_pts_attr_dh_nonce_params_req
19: * @{ @ingroup tcg_attr
20: */
21:
22: #ifndef TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_
23: #define TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_
24:
25: typedef struct tcg_pts_attr_dh_nonce_params_req_t
26: tcg_pts_attr_dh_nonce_params_req_t;
27:
28: #include "tcg/tcg_attr.h"
29: #include "pa_tnc/pa_tnc_attr.h"
30: #include "pts/pts_dh_group.h"
31:
32: /**
33: * Class implementing the TCG PTS DH Nonce Parameters Request Attribute
34: */
35: struct tcg_pts_attr_dh_nonce_params_req_t {
36:
37: /**
38: * Public PA-TNC attribute interface
39: */
40: pa_tnc_attr_t pa_tnc_attribute;
41:
42: /**
43: * Get Minimum nonce length
44: *
45: * @return Minimum acceptable length of nonce
46: */
47: uint8_t (*get_min_nonce_len)(tcg_pts_attr_dh_nonce_params_req_t *this);
48:
49: /**
50: * Get supported Diffie Hellman Groups
51: *
52: * @return Supported Diffie Hellman Groups
53: */
54: pts_dh_group_t (*get_dh_groups)(tcg_pts_attr_dh_nonce_params_req_t *this);
55: };
56:
57: /**
58: * Creates an tcg_pts_attr_dh_nonce_params_req_t object
59: *
60: * @param min_nonce_len Minimum acceptable length of nonce
61: * @param dh_groups Initiator's supported DH groups
62: */
63: pa_tnc_attr_t* tcg_pts_attr_dh_nonce_params_req_create(uint8_t min_nonce_len,
64: pts_dh_group_t dh_groups);
65:
66: /**
67: * Creates an tcg_pts_attr_dh_nonce_params_req_t object from received data
68: *
69: * @param length Total length of attribute value
70: * @param value Unparsed attribute value (might be a segment)
71: */
72: pa_tnc_attr_t* tcg_pts_attr_dh_nonce_params_req_create_from_data(size_t length,
73: chunk_t value);
74:
75: #endif /** TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>