Added a stub for the EAP-AKA backend implementing the 3GPP2 functions in software
[strongswan.git] / src / charon / plugins / eap_aka_3gpp2 / eap_aka_3gpp2_provider.c
1 /*
2 * Copyright (C) 2008-2009 Martin Willi
3 * 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 "eap_aka_3gpp2_provider.h"
17
18 typedef struct private_eap_aka_3gpp2_provider_t private_eap_aka_3gpp2_provider_t;
19
20 /**
21 * Private data of an eap_aka_3gpp2_provider_t object.
22 */
23 struct private_eap_aka_3gpp2_provider_t {
24
25 /**
26 * Public eap_aka_3gpp2_provider_t interface.
27 */
28 eap_aka_3gpp2_provider_t public;
29
30 /**
31 * AKA functions
32 */
33 eap_aka_3gpp2_functions_t *f;
34 };
35
36 /**
37 * Implementation of usim_provider_t.get_quintuplet
38 */
39 static bool get_quintuplet(private_eap_aka_3gpp2_provider_t *this,
40 identification_t *imsi, char rand[16], char xres[16],
41 char ck[16], char ik[16], char autn[16])
42 {
43 return FALSE;
44 }
45
46 /**
47 * Implementation of usim_provider_t.resync
48 */
49 static bool resync(private_eap_aka_3gpp2_provider_t *this,
50 identification_t *imsi, char rand[16], char auts[16])
51 {
52 return FALSE;
53 }
54
55 /**
56 * Implementation of eap_aka_3gpp2_provider_t.destroy.
57 */
58 static void destroy(private_eap_aka_3gpp2_provider_t *this)
59 {
60 free(this);
61 }
62
63 /**
64 * See header
65 */
66 eap_aka_3gpp2_provider_t *eap_aka_3gpp2_provider_create(
67 eap_aka_3gpp2_functions_t *f)
68 {
69 private_eap_aka_3gpp2_provider_t *this = malloc_thing(private_eap_aka_3gpp2_provider_t);
70
71 this->public.provider.get_quintuplet = (bool(*)(usim_provider_t*, identification_t *imsi, char rand[16], char xres[16], char ck[16], char ik[16], char autn[16]))get_quintuplet;
72 this->public.provider.resync = (bool(*)(usim_provider_t*, identification_t *imsi, char rand[16], char auts[16]))resync;
73 this->public.destroy = (void(*)(eap_aka_3gpp2_provider_t*))destroy;
74
75 this->f = f;
76
77 return &this->public;
78 }
79