equal
deleted
inserted
replaced
1678 } |
1678 } |
1679 |
1679 |
1680 //-------------------------------------------------- |
1680 //-------------------------------------------------- |
1681 |
1681 |
1682 // |
1682 // |
1683 eap_status_e eapol_key_state_c::complete_reassociation( |
1683 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::complete_reassociation( |
1684 const eapol_wlan_authentication_state_e reassociation_result, |
1684 const eapol_wlan_authentication_state_e reassociation_result, |
1685 const eap_am_network_id_c * const /* receive_network_id */, |
1685 const eap_am_network_id_c * const /* receive_network_id */, |
1686 const eapol_key_authentication_type_e authentication_type, |
1686 const eapol_key_authentication_type_e authentication_type, |
1687 const eap_variable_data_c * const received_WPA_IE, |
1687 const eap_variable_data_c * const received_WPA_IE, |
1688 const eap_variable_data_c * const sent_WPA_IE, |
1688 const eap_variable_data_c * const sent_WPA_IE, |
2688 } |
2688 } |
2689 |
2689 |
2690 //-------------------------------------------------- |
2690 //-------------------------------------------------- |
2691 |
2691 |
2692 // |
2692 // |
2693 eap_status_e eapol_key_state_c::check_is_aes_key_wrap_padding( |
2693 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::check_is_aes_key_wrap_padding( |
2694 const eapol_RSNA_key_descriptor_type_e /* current_key_data_type */, |
2694 const eapol_RSNA_key_descriptor_type_e /* current_key_data_type */, |
2695 eapol_rsna_key_data_header_c * const key_data_payload, |
2695 eapol_rsna_key_data_header_c * const key_data_payload, |
2696 const u32_t key_data_max_length |
2696 const u32_t key_data_max_length |
2697 ) |
2697 ) |
2698 { |
2698 { |
2720 } |
2720 } |
2721 |
2721 |
2722 //-------------------------------------------------- |
2722 //-------------------------------------------------- |
2723 |
2723 |
2724 // |
2724 // |
2725 eap_status_e eapol_key_state_c::parse_generic_key_data_payload( |
2725 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::parse_generic_key_data_payload( |
2726 const eapol_key_descriptor_type_e eapol_key_descriptor_type, |
2726 const eapol_key_descriptor_type_e eapol_key_descriptor_type, |
2727 const eapol_RSNA_key_descriptor_type_e current_key_descriptor_type, |
2727 const eapol_RSNA_key_descriptor_type_e current_key_descriptor_type, |
2728 eapol_rsna_key_data_header_c * const key_data_payload, |
2728 eapol_rsna_key_data_header_c * const key_data_payload, |
2729 u32_t * const key_data_max_length, |
2729 u32_t * const key_data_max_length, |
2730 eapol_rsna_key_data_payloads_c * const p_rsna_key_data_payloads, |
2730 eapol_rsna_key_data_payloads_c * const p_rsna_key_data_payloads, |
3464 } |
3464 } |
3465 |
3465 |
3466 //-------------------------------------------------- |
3466 //-------------------------------------------------- |
3467 |
3467 |
3468 // |
3468 // |
3469 eap_status_e eapol_key_state_c::parse_key_data( |
3469 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::parse_key_data( |
3470 const eapol_key_descriptor_type_e eapol_key_descriptor_type, |
3470 const eapol_key_descriptor_type_e eapol_key_descriptor_type, |
3471 const eapol_rsna_key_data_header_c * const p_payload, |
3471 const eapol_rsna_key_data_header_c * const p_payload, |
3472 u32_t * const buffer_length, |
3472 u32_t * const buffer_length, |
3473 eapol_rsna_key_data_payloads_c * const p_rsna_key_data_payloads, |
3473 eapol_rsna_key_data_payloads_c * const p_rsna_key_data_payloads, |
3474 const eapol_key_state_e expected_key_message, |
3474 const eapol_key_state_e expected_key_message, |
3624 } |
3624 } |
3625 |
3625 |
3626 //-------------------------------------------------- |
3626 //-------------------------------------------------- |
3627 |
3627 |
3628 // |
3628 // |
3629 eap_status_e eapol_key_state_c::rsna_prf( |
3629 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::rsna_prf( |
3630 const eap_variable_data_c * const key_K, |
3630 const eap_variable_data_c * const key_K, |
3631 const eap_variable_data_c * const label_A, |
3631 const eap_variable_data_c * const label_A, |
3632 const eap_variable_data_c * const input_B, |
3632 const eap_variable_data_c * const input_B, |
3633 const u32_t output_length_bits, |
3633 const u32_t output_length_bits, |
3634 eap_variable_data_c * const output |
3634 eap_variable_data_c * const output |
3764 } |
3764 } |
3765 |
3765 |
3766 //-------------------------------------------------- |
3766 //-------------------------------------------------- |
3767 |
3767 |
3768 // |
3768 // |
3769 eap_status_e eapol_key_state_c::select_minimum( |
3769 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::select_minimum( |
3770 const eap_variable_data_c * const input_a, |
3770 const eap_variable_data_c * const input_a, |
3771 const eap_variable_data_c * const input_b, |
3771 const eap_variable_data_c * const input_b, |
3772 const eap_variable_data_c ** const minimum, |
3772 const eap_variable_data_c ** const minimum, |
3773 const eap_variable_data_c ** const maximum) |
3773 const eap_variable_data_c ** const maximum) |
3774 { |
3774 { |
3813 } |
3813 } |
3814 |
3814 |
3815 //-------------------------------------------------- |
3815 //-------------------------------------------------- |
3816 |
3816 |
3817 // |
3817 // |
3818 eap_status_e eapol_key_state_c::derive_PTK() |
3818 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::derive_PTK() |
3819 { |
3819 { |
3820 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
3820 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
3821 |
3821 |
3822 EAP_TRACE_DEBUG( |
3822 EAP_TRACE_DEBUG( |
3823 m_am_tools, |
3823 m_am_tools, |
4095 } |
4095 } |
4096 |
4096 |
4097 //-------------------------------------------------- |
4097 //-------------------------------------------------- |
4098 |
4098 |
4099 // |
4099 // |
4100 eap_status_e eapol_key_state_c::create_nonce( |
4100 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_nonce( |
4101 eap_variable_data_c * const nonce, const u32_t nonce_length) |
4101 eap_variable_data_c * const nonce, const u32_t nonce_length) |
4102 { |
4102 { |
4103 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4103 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4104 |
4104 |
4105 EAP_TRACE_DEBUG( |
4105 EAP_TRACE_DEBUG( |
4147 } |
4147 } |
4148 |
4148 |
4149 //-------------------------------------------------- |
4149 //-------------------------------------------------- |
4150 |
4150 |
4151 // |
4151 // |
4152 eap_status_e eapol_key_state_c::create_PMKID() |
4152 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_PMKID() |
4153 { |
4153 { |
4154 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4154 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4155 eap_status_e status = eap_status_process_general_error; |
4155 eap_status_e status = eap_status_process_general_error; |
4156 |
4156 |
4157 if (m_pairwise_PMK_WPXK3.get_is_valid_data() == false) |
4157 if (m_pairwise_PMK_WPXK3.get_is_valid_data() == false) |
4284 } |
4284 } |
4285 |
4285 |
4286 //-------------------------------------------------- |
4286 //-------------------------------------------------- |
4287 |
4287 |
4288 // |
4288 // |
4289 eap_status_e eapol_key_state_c::encrypt_key_data( |
4289 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::encrypt_key_data( |
4290 eapol_RSNA_key_header_c * const eapol_key_message) |
4290 eapol_RSNA_key_header_c * const eapol_key_message) |
4291 { |
4291 { |
4292 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4292 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4293 eap_status_e status = eap_status_process_general_error; |
4293 eap_status_e status = eap_status_process_general_error; |
4294 |
4294 |
4486 } |
4486 } |
4487 |
4487 |
4488 //-------------------------------------------------- |
4488 //-------------------------------------------------- |
4489 |
4489 |
4490 // |
4490 // |
4491 eap_status_e eapol_key_state_c::decrypt_key_data( |
4491 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::decrypt_key_data( |
4492 eapol_RSNA_key_header_c * const eapol_key_message) |
4492 eapol_RSNA_key_header_c * const eapol_key_message) |
4493 { |
4493 { |
4494 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4494 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4495 eap_status_e status = eap_status_process_general_error; |
4495 eap_status_e status = eap_status_process_general_error; |
4496 |
4496 |
4635 |
4635 |
4636 //-------------------------------------------------- |
4636 //-------------------------------------------------- |
4637 |
4637 |
4638 |
4638 |
4639 // |
4639 // |
4640 eap_status_e eapol_key_state_c::create_key_mic( |
4640 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_key_mic( |
4641 eapol_RSNA_key_header_c * const eapol_key_message, |
4641 eapol_RSNA_key_header_c * const eapol_key_message, |
4642 const eap_variable_data_c * const confirmation_key) |
4642 const eap_variable_data_c * const confirmation_key) |
4643 { |
4643 { |
4644 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4644 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
4645 eap_status_e status = eap_status_process_general_error; |
4645 eap_status_e status = eap_status_process_general_error; |
4807 } |
4807 } |
4808 |
4808 |
4809 //-------------------------------------------------- |
4809 //-------------------------------------------------- |
4810 |
4810 |
4811 // |
4811 // |
4812 eap_status_e eapol_key_state_c::verify_key_mic( |
4812 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::verify_key_mic( |
4813 eapol_RSNA_key_header_c * const eapol_key_message, |
4813 eapol_RSNA_key_header_c * const eapol_key_message, |
4814 const eap_variable_data_c * const confirmation_key) |
4814 const eap_variable_data_c * const confirmation_key) |
4815 { |
4815 { |
4816 eap_variable_data_c original_MIC(m_am_tools); |
4816 eap_variable_data_c original_MIC(m_am_tools); |
4817 |
4817 |
6090 } |
6090 } |
6091 |
6091 |
6092 //-------------------------------------------------- |
6092 //-------------------------------------------------- |
6093 |
6093 |
6094 // |
6094 // |
6095 eap_status_e eapol_key_state_c::create_tkip_mic_failure_message( |
6095 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_tkip_mic_failure_message( |
6096 eap_buf_chain_wr_c * const sent_packet, |
6096 eap_buf_chain_wr_c * const sent_packet, |
6097 const u32_t eapol_header_offset, |
6097 const u32_t eapol_header_offset, |
6098 u32_t * const data_length, |
6098 u32_t * const data_length, |
6099 u32_t * const buffer_length, |
6099 u32_t * const buffer_length, |
6100 const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type, |
6100 const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type, |
6399 } |
6399 } |
6400 |
6400 |
6401 //-------------------------------------------------- |
6401 //-------------------------------------------------- |
6402 |
6402 |
6403 // |
6403 // |
6404 eap_status_e eapol_key_state_c::allow_4_way_handshake() |
6404 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::allow_4_way_handshake() |
6405 { |
6405 { |
6406 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6406 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6407 eap_status_e status = eap_status_process_general_error; |
6407 eap_status_e status = eap_status_process_general_error; |
6408 |
6408 |
6409 EAP_TRACE_DEBUG( |
6409 EAP_TRACE_DEBUG( |
6499 } |
6499 } |
6500 |
6500 |
6501 //-------------------------------------------------- |
6501 //-------------------------------------------------- |
6502 |
6502 |
6503 // |
6503 // |
6504 eap_status_e eapol_key_state_c::start_group_key_handshake( |
6504 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::start_group_key_handshake( |
6505 const eap_am_network_id_c * const receive_network_id, |
6505 const eap_am_network_id_c * const receive_network_id, |
6506 const eapol_protocol_version_e received_eapol_version, |
6506 const eapol_protocol_version_e received_eapol_version, |
6507 const eapol_key_descriptor_type_e received_key_descriptor_type) |
6507 const eapol_key_descriptor_type_e received_key_descriptor_type) |
6508 { |
6508 { |
6509 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6509 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6632 } |
6632 } |
6633 |
6633 |
6634 //-------------------------------------------------- |
6634 //-------------------------------------------------- |
6635 |
6635 |
6636 // |
6636 // |
6637 eap_status_e eapol_key_state_c::get_key_length( |
6637 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::get_key_length( |
6638 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e cipher, |
6638 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e cipher, |
6639 u16_t * const key_length) |
6639 u16_t * const key_length) |
6640 { |
6640 { |
6641 if (cipher |
6641 if (cipher |
6642 == eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP) |
6642 == eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP) |
6670 } |
6670 } |
6671 |
6671 |
6672 //-------------------------------------------------- |
6672 //-------------------------------------------------- |
6673 |
6673 |
6674 // |
6674 // |
6675 eap_status_e eapol_key_state_c::process_4_way_handshake_message( |
6675 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_4_way_handshake_message( |
6676 const eap_am_network_id_c * const receive_network_id, |
6676 const eap_am_network_id_c * const receive_network_id, |
6677 eapol_RSNA_key_header_c * const eapol_key_message, |
6677 eapol_RSNA_key_header_c * const eapol_key_message, |
6678 const u32_t packet_length) |
6678 const u32_t packet_length) |
6679 { |
6679 { |
6680 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6680 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6775 } |
6775 } |
6776 |
6776 |
6777 //-------------------------------------------------- |
6777 //-------------------------------------------------- |
6778 |
6778 |
6779 // |
6779 // |
6780 eap_status_e eapol_key_state_c::process_group_key_handshake_message( |
6780 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_group_key_handshake_message( |
6781 const eap_am_network_id_c * const receive_network_id, |
6781 const eap_am_network_id_c * const receive_network_id, |
6782 eapol_RSNA_key_header_c * const eapol_key_message, |
6782 eapol_RSNA_key_header_c * const eapol_key_message, |
6783 const u32_t packet_length) |
6783 const u32_t packet_length) |
6784 { |
6784 { |
6785 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6785 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6844 } |
6844 } |
6845 |
6845 |
6846 //-------------------------------------------------- |
6846 //-------------------------------------------------- |
6847 |
6847 |
6848 // |
6848 // |
6849 eap_status_e eapol_key_state_c::process_RSNA_key_descriptor( |
6849 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_RSNA_key_descriptor( |
6850 const eap_am_network_id_c * const receive_network_id, |
6850 const eap_am_network_id_c * const receive_network_id, |
6851 eap_general_header_base_c * const packet_data, |
6851 eap_general_header_base_c * const packet_data, |
6852 const u32_t packet_length) |
6852 const u32_t packet_length) |
6853 { |
6853 { |
6854 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
6854 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |