Avoid proxy for bypass_socket, enable_udp_decap
[strongswan.git] / src / charon-tkm / src / tkm / tkm_diffie_hellman.h
1 /*
2 * Copyright (C) 2012 Reto Buerki
3 * Copyright (C) 2012 Adrian-Ken Rueegsegger
4 * 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 #ifndef TKM_DIFFIE_HELLMAN_H_
18 #define TKM_DIFFIE_HELLMAN_H_
19
20 typedef struct tkm_diffie_hellman_t tkm_diffie_hellman_t;
21
22 #include <library.h>
23 #include <tkm/types.h>
24
25 /**
26 * diffie_hellman_t implementation using the trusted key manager.
27 */
28 struct tkm_diffie_hellman_t {
29
30 /**
31 * Implements diffie_hellman_t interface.
32 */
33 diffie_hellman_t dh;
34
35 /**
36 * Get Diffie-Hellman context id.
37 *
38 * @return id of this DH context.
39 */
40 dh_id_type (*get_id)(tkm_diffie_hellman_t * const this);
41
42 };
43
44 /**
45 * Creates a new tkm_diffie_hellman_t object.
46 *
47 * @param group Diffie Hellman group number to use
48 * @return tkm_diffie_hellman_t object, NULL if not supported
49 */
50 tkm_diffie_hellman_t *tkm_diffie_hellman_create(diffie_hellman_group_t group);
51
52 #endif /** TKM_DIFFIE_HELLMAN_H_ */