Annotation of embedaddon/strongswan/src/libcharon/plugins/load_tester/load_tester_diffie_hellman.c, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2008 Martin Willi
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: #include "load_tester_diffie_hellman.h"
17:
18: METHOD(diffie_hellman_t, get_my_public_value, bool,
19: load_tester_diffie_hellman_t *this, chunk_t *value)
20: {
21: *value = chunk_empty;
22: return TRUE;
23: }
24:
25: METHOD(diffie_hellman_t, set_other_public_value, bool,
26: load_tester_diffie_hellman_t *this, chunk_t value)
27: {
28: return TRUE;
29: }
30:
31: METHOD(diffie_hellman_t, get_shared_secret, bool,
32: load_tester_diffie_hellman_t *this, chunk_t *secret)
33: {
34: *secret = chunk_empty;
35: return TRUE;
36: }
37:
38: METHOD(diffie_hellman_t, get_dh_group, diffie_hellman_group_t,
39: load_tester_diffie_hellman_t *this)
40: {
41: return MODP_NULL;
42: }
43:
44: METHOD(diffie_hellman_t, destroy, void,
45: load_tester_diffie_hellman_t *this)
46: {
47: free(this);
48: }
49:
50: /**
51: * See header
52: */
53: load_tester_diffie_hellman_t *load_tester_diffie_hellman_create(
54: diffie_hellman_group_t group)
55: {
56: load_tester_diffie_hellman_t *this;
57:
58: if (group != MODP_NULL)
59: {
60: return NULL;
61: }
62:
63: INIT(this,
64: .dh = {
65: .get_shared_secret = _get_shared_secret,
66: .set_other_public_value = _set_other_public_value,
67: .get_my_public_value = _get_my_public_value,
68: .get_dh_group = _get_dh_group,
69: .destroy = _destroy,
70: }
71: );
72:
73: return this;
74: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>