|
1 /* |
|
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #if !defined(_ABS_SIM_ALGORITHM_H_) |
|
22 #define _ABS_SIM_ALGORITHM_H_ |
|
23 |
|
24 #include "eap_tools.h" |
|
25 #include "eap_variable_data.h" |
|
26 #include "abs_eap_am_tools.h" |
|
27 #include "eap_am_tools.h" |
|
28 #include "eap_am_export.h" |
|
29 #include "eap_sim_triplets.h" |
|
30 |
|
31 enum sim_algorithm_e |
|
32 { |
|
33 sim_algorithm_none, |
|
34 sim_algorithm_nokia_test_network_xor, |
|
35 sim_algorithm_tls_prf_with_shared_secret, |
|
36 }; |
|
37 |
|
38 |
|
39 /// This class is implements Nokia test network SIM algorithm. |
|
40 class EAP_EXPORT abs_eap_am_sim_algorithm_c |
|
41 { |
|
42 private: |
|
43 //-------------------------------------------------- |
|
44 |
|
45 virtual void set_is_valid() = 0; |
|
46 |
|
47 //-------------------------------------------------- |
|
48 protected: |
|
49 //-------------------------------------------------- |
|
50 |
|
51 //-------------------------------------------------- |
|
52 public: |
|
53 //-------------------------------------------------- |
|
54 |
|
55 // |
|
56 virtual ~abs_eap_am_sim_algorithm_c(){}; |
|
57 |
|
58 virtual bool get_is_valid() = 0; |
|
59 |
|
60 virtual eap_status_e set_simulator_sim_ki(const eap_variable_data_c * const simulator_sim_ki) = 0; |
|
61 |
|
62 virtual eap_status_e generate_kc_sres( |
|
63 const sim_algorithm_e sim_algorithm, |
|
64 const u8_t * const rand, |
|
65 const u32_t rand_length, |
|
66 u8_t * const kc_sres, |
|
67 const u32_t kc_sres_length) = 0; |
|
68 |
|
69 //-------------------------------------------------- |
|
70 }; // class abs_eap_am_sim_algorithm_c |
|
71 |
|
72 |
|
73 /** @file */ |
|
74 |
|
75 #endif //#if !defined(_ABS_SIM_ALGORITHM_H_) |
|
76 |
|
77 //-------------------------------------------------- |
|
78 |
|
79 |
|
80 |
|
81 // End. |