eapol/eapol_framework/eapol_common/include/eap_master_session_key.h
changeset 0 c8830336c852
child 2 1c7bc153c08e
equal deleted inserted replaced
-1:000000000000 0:c8830336c852
       
     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(_EAP_MASTER_SESSION_KEY_H_)
       
    22 #define _EAP_MASTER_SESSION_KEY_H_
       
    23 
       
    24 #include "eap_am_types.h"
       
    25 #include "eap_am_export.h"
       
    26 //#include "eap_am_memory.h"
       
    27 #include "eap_am_assert.h"
       
    28 #include "eap_status.h"
       
    29 #include "eap_variable_data.h"
       
    30 #include "eap_header.h"
       
    31 
       
    32 //--------------------------------------------------
       
    33 
       
    34 class abs_eap_am_tools_c;
       
    35 
       
    36 
       
    37 /// This class stores data of master session key.
       
    38 class EAP_EXPORT eap_master_session_key_c
       
    39 : public eap_variable_data_c
       
    40 {
       
    41 private:
       
    42 	//--------------------------------------------------
       
    43 
       
    44 	/// This is pointer to the tools class. @see abs_eap_am_tools_c
       
    45 	abs_eap_am_tools_c * const m_am_tools;
       
    46 
       
    47 	/// LEAP uses password in the RADIUS message generation too.
       
    48 	eap_variable_data_c m_leap_password;
       
    49 
       
    50 	/// This is the EAP-type.
       
    51 	eap_type_value_e m_eap_type;
       
    52 
       
    53 	//--------------------------------------------------
       
    54 protected:
       
    55 	//--------------------------------------------------
       
    56 
       
    57 	//--------------------------------------------------
       
    58 public:
       
    59 	//--------------------------------------------------
       
    60 
       
    61 	/**
       
    62 	 * Destructor of the eap_variable_data class will release 
       
    63 	 * the buffer if attribute m_free_buffer is true.
       
    64 	 */
       
    65 	EAP_FUNC_IMPORT virtual ~eap_master_session_key_c();
       
    66 
       
    67 	/**
       
    68 	 * Constructor takes only one parameter called tools.
       
    69 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
       
    70 	 */
       
    71 	EAP_FUNC_IMPORT eap_master_session_key_c(
       
    72 		abs_eap_am_tools_c * const tools,
       
    73 		const eap_type_value_e eap_type);
       
    74 
       
    75 	EAP_FUNC_IMPORT eap_type_value_e get_eap_type() const;
       
    76 
       
    77 	EAP_FUNC_IMPORT void set_eap_type(eap_type_value_e type);
       
    78 
       
    79 	EAP_FUNC_IMPORT const eap_variable_data_c * get_leap_password() const;
       
    80 
       
    81 	EAP_FUNC_IMPORT eap_status_e copy_leap_password(const eap_variable_data_c * const key);
       
    82 
       
    83 	EAP_FUNC_IMPORT eap_status_e set_copy(const eap_master_session_key_c * const msk);
       
    84 
       
    85 	//--------------------------------------------------
       
    86 }; // class eap_master_session_key_c
       
    87 
       
    88 
       
    89 #endif //#if !defined(_EAP_MASTER_SESSION_KEY_H_)
       
    90 
       
    91 
       
    92 
       
    93 // End.