515 EAP_UNREFERENCED_PARAMETER(data); |
517 EAP_UNREFERENCED_PARAMETER(data); |
516 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
518 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
517 |
519 |
518 EAP_TRACE_DEBUG( |
520 EAP_TRACE_DEBUG( |
519 m_am_tools, |
521 m_am_tools, |
520 EAP_TRACE_FLAGS_MESSAGE_DATA, |
522 TRACE_FLAGS_DEFAULT, |
521 (EAPL("TIMER: %s: [0x%08x]->eap_pac_store_server_message_if_c::timer_delete_data(id 0x%02x, data 0x%08x).\n"), |
523 (EAPL("TIMER: %s: [0x%08x]->eap_pac_store_server_message_if_c::timer_delete_data(id 0x%02x, data 0x%08x).\n"), |
522 (m_is_client == true) ? "client": "server", |
524 (m_is_client == true) ? "client": "server", |
523 this, id, data)); |
525 this, id, data)); |
524 |
526 |
525 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::timer_delete_data()"); |
527 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::timer_delete_data()"); |
526 |
528 |
527 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
529 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
528 } |
530 } |
529 |
531 |
530 //-------------------------------------------------- |
532 //-------------------------------------------------- |
531 |
533 |
532 eap_status_e eap_pac_store_server_message_if_c::open_pac_store( |
534 eap_status_e eap_pac_store_server_message_if_c::is_master_key_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
533 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
|
534 { |
|
535 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
536 |
|
537 EAP_TRACE_DEBUG( |
|
538 m_am_tools, |
|
539 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
540 (EAPL("%s: eap_pac_store_server_message_if_c::open_pac_store()\n"), |
|
541 (m_is_client == true) ? "client": "server")); |
|
542 |
|
543 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::open_pac_store()"); |
|
544 |
|
545 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
546 |
|
547 eap_status_e status(eap_status_ok); |
|
548 |
|
549 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
550 |
|
551 status = m_am_client->open_pac_store(); |
|
552 |
|
553 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
554 |
|
555 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
556 return EAP_STATUS_RETURN(m_am_tools, status); |
|
557 } |
|
558 |
|
559 //-------------------------------------------------- |
|
560 |
|
561 eap_status_e eap_pac_store_server_message_if_c::create_device_seed(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
|
562 { |
535 { |
563 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
536 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
564 |
537 |
565 eap_status_e status(eap_status_ok); |
538 eap_status_e status(eap_status_ok); |
566 |
539 |
567 EAP_TRACE_DEBUG( |
540 EAP_TRACE_DEBUG( |
568 m_am_tools, |
541 m_am_tools, |
569 EAP_TRACE_FLAGS_MESSAGE_DATA, |
542 TRACE_FLAGS_DEFAULT, |
570 (EAPL("eap_pac_store_server_message_if_c::create_device_seed(): this = 0x%08x.\n"), |
|
571 this)); |
|
572 |
|
573 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::create_device_seed()"); |
|
574 |
|
575 status = m_am_client->create_device_seed(); |
|
576 |
|
577 return status; |
|
578 |
|
579 } |
|
580 //-------------------------------------------------- |
|
581 |
|
582 eap_status_e eap_pac_store_server_message_if_c::is_master_key_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
|
583 { |
|
584 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
585 |
|
586 eap_status_e status(eap_status_ok); |
|
587 |
|
588 EAP_TRACE_DEBUG( |
|
589 m_am_tools, |
|
590 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
591 (EAPL("eap_pac_store_server_message_if_c::is_master_key_present(): this = 0x%08x.\n"), |
543 (EAPL("eap_pac_store_server_message_if_c::is_master_key_present(): this = 0x%08x.\n"), |
592 this)); |
544 this)); |
593 |
545 |
594 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::is_master_key_present()"); |
546 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::is_master_key_present()"); |
595 |
547 |
596 status = m_am_client->is_master_key_present(); |
548 status = m_am_client->is_master_key_present(); |
597 |
549 |
598 return status; |
550 return status; |
599 |
551 |
600 } |
552 } |
|
553 |
601 //-------------------------------------------------- |
554 //-------------------------------------------------- |
602 |
555 |
603 eap_status_e eap_pac_store_server_message_if_c::is_master_key_and_password_matching(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
556 eap_status_e eap_pac_store_server_message_if_c::is_master_key_and_password_matching(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
604 { |
557 { |
605 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
558 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
606 |
559 |
607 eap_status_e status(eap_status_ok); |
560 eap_status_e status(eap_status_ok); |
608 |
561 |
609 EAP_TRACE_DEBUG( |
562 EAP_TRACE_DEBUG( |
610 m_am_tools, |
563 m_am_tools, |
611 EAP_TRACE_FLAGS_MESSAGE_DATA, |
564 TRACE_FLAGS_DEFAULT, |
612 (EAPL("eap_pac_store_server_message_if_c::is_master_key_and_password_matching(): this = 0x%08x.\n"), |
565 (EAPL("eap_pac_store_server_message_if_c::is_master_key_and_password_matching(): this = 0x%08x.\n"), |
613 this)); |
566 this)); |
614 |
567 |
615 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::is_master_key_and_password_matching()"); |
568 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::is_master_key_and_password_matching()"); |
616 |
569 |
617 u32_t parameter_index(eap_message_payload_index_first_parameter); |
570 u32_t parameter_index(eap_message_payload_index_first_parameter); |
618 |
571 |
619 eap_process_tlv_message_data_c message_data(m_am_tools); |
572 eap_process_tlv_message_data_c message_data(m_am_tools); |
620 |
573 |
621 if (message_data.get_is_valid() == false) |
574 if (message_data.get_is_valid() == false) |
622 { |
575 { |
623 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
576 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
624 return EAP_STATUS_RETURN(m_am_tools, status); |
577 return EAP_STATUS_RETURN(m_am_tools, status); |
625 } |
578 } |
626 |
579 |
627 eap_variable_data_c * const password = new eap_variable_data_c(m_am_tools); |
580 eap_variable_data_c * const password = new eap_variable_data_c(m_am_tools); |
628 // eap_automatic_variable_c can be used in this block because no functions are leaving here. |
581 // eap_automatic_variable_c can be used in this block because no functions are leaving here. |
629 eap_automatic_variable_c<eap_variable_data_c> automatic_password_data(m_am_tools, password); |
582 eap_automatic_variable_c<eap_variable_data_c> automatic_password_data(m_am_tools, password); |
630 |
583 |
643 status = m_am_client->is_master_key_and_password_matching(password); |
596 status = m_am_client->is_master_key_and_password_matching(password); |
644 |
597 |
645 return status; |
598 return status; |
646 |
599 |
647 } |
600 } |
|
601 |
648 //-------------------------------------------------- |
602 //-------------------------------------------------- |
649 |
603 |
650 eap_status_e eap_pac_store_server_message_if_c::create_and_save_master_key(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
604 eap_status_e eap_pac_store_server_message_if_c::create_and_save_master_key(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
651 { |
605 { |
652 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
606 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
653 |
607 |
654 eap_status_e status(eap_status_ok); |
608 eap_status_e status(eap_status_ok); |
655 |
609 |
656 EAP_TRACE_DEBUG( |
610 EAP_TRACE_DEBUG( |
657 m_am_tools, |
611 m_am_tools, |
658 EAP_TRACE_FLAGS_MESSAGE_DATA, |
612 TRACE_FLAGS_DEFAULT, |
659 (EAPL("eap_pac_store_server_message_if_c::create_and_save_master_key(): this = 0x%08x.\n"), |
613 (EAPL("eap_pac_store_server_message_if_c::create_and_save_master_key(): this = 0x%08x.\n"), |
660 this)); |
614 this)); |
661 |
615 |
662 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::create_and_save_master_key()"); |
616 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::create_and_save_master_key()"); |
663 |
617 |
664 u32_t parameter_index(eap_message_payload_index_first_parameter); |
618 u32_t parameter_index(eap_message_payload_index_first_parameter); |
665 |
619 |
666 eap_process_tlv_message_data_c message_data(m_am_tools); |
620 eap_process_tlv_message_data_c message_data(m_am_tools); |
667 |
621 |
690 status = m_am_client->create_and_save_master_key(password); |
644 status = m_am_client->create_and_save_master_key(password); |
691 |
645 |
692 return status; |
646 return status; |
693 |
647 |
694 } |
648 } |
|
649 |
695 //-------------------------------------------------- |
650 //-------------------------------------------------- |
696 |
651 |
697 eap_status_e eap_pac_store_server_message_if_c::is_pacstore_password_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
652 eap_status_e eap_pac_store_server_message_if_c::is_pacstore_password_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
698 { |
653 { |
699 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
654 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
700 |
655 |
701 eap_status_e status(eap_status_ok); |
656 eap_status_e status(eap_status_ok); |
702 |
657 |
703 EAP_TRACE_DEBUG( |
658 EAP_TRACE_DEBUG( |
704 m_am_tools, |
659 m_am_tools, |
705 EAP_TRACE_FLAGS_MESSAGE_DATA, |
660 TRACE_FLAGS_DEFAULT, |
706 (EAPL("eap_pac_store_server_message_if_c::is_pacstore_password_present(): this = 0x%08x.\n"), |
661 (EAPL("eap_pac_store_server_message_if_c::is_pacstore_password_present(): this = 0x%08x.\n"), |
707 this)); |
662 this)); |
708 |
663 |
709 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::is_pacstore_password_present()"); |
664 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::is_pacstore_password_present()"); |
710 |
665 |
711 eap_process_tlv_message_data_c message_data(m_am_tools); |
666 eap_process_tlv_message_data_c message_data(m_am_tools); |
712 |
667 |
713 if (message_data.get_is_valid() == false) |
668 if (message_data.get_is_valid() == false) |
714 { |
669 { |
719 status = m_am_client->is_pacstore_password_present(); |
674 status = m_am_client->is_pacstore_password_present(); |
720 |
675 |
721 return status; |
676 return status; |
722 |
677 |
723 } |
678 } |
724 //-------------------------------------------------- |
679 |
|
680 //-------------------------------------------------- |
|
681 |
725 eap_status_e eap_pac_store_server_message_if_c::compare_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
682 eap_status_e eap_pac_store_server_message_if_c::compare_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
726 { |
683 { |
727 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
684 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
728 |
685 |
729 eap_status_e status(eap_status_ok); |
686 eap_status_e status(eap_status_ok); |
730 |
687 |
731 EAP_TRACE_DEBUG( |
688 EAP_TRACE_DEBUG( |
732 m_am_tools, |
689 m_am_tools, |
733 EAP_TRACE_FLAGS_MESSAGE_DATA, |
690 TRACE_FLAGS_DEFAULT, |
734 (EAPL("eap_pac_store_server_message_if_c::compare_pac_store_password(): this = 0x%08x.\n"), |
691 (EAPL("eap_pac_store_server_message_if_c::compare_pac_store_password(): this = 0x%08x.\n"), |
735 this)); |
692 this)); |
736 |
693 |
737 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::compare_pac_store_password()"); |
694 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::compare_pac_store_password()"); |
738 |
695 |
739 u32_t parameter_index(eap_message_payload_index_first_parameter); |
696 u32_t parameter_index(eap_message_payload_index_first_parameter); |
740 |
697 |
741 eap_process_tlv_message_data_c message_data(m_am_tools); |
698 eap_process_tlv_message_data_c message_data(m_am_tools); |
742 |
699 |
766 status = m_am_client->compare_pac_store_password(password); |
723 status = m_am_client->compare_pac_store_password(password); |
767 |
724 |
768 return status; |
725 return status; |
769 |
726 |
770 } |
727 } |
|
728 |
771 //-------------------------------------------------- |
729 //-------------------------------------------------- |
772 |
730 |
773 eap_status_e eap_pac_store_server_message_if_c::set_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
731 eap_status_e eap_pac_store_server_message_if_c::set_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
774 { |
732 { |
775 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
733 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
776 |
734 |
777 eap_status_e status(eap_status_ok); |
735 eap_status_e status(eap_status_ok); |
778 |
736 |
779 EAP_TRACE_DEBUG( |
737 EAP_TRACE_DEBUG( |
780 m_am_tools, |
738 m_am_tools, |
781 EAP_TRACE_FLAGS_MESSAGE_DATA, |
739 TRACE_FLAGS_DEFAULT, |
782 (EAPL("eap_pac_store_server_message_if_c::set_pac_store_password(): this = 0x%08x.\n"), |
740 (EAPL("eap_pac_store_server_message_if_c::set_pac_store_password(): this = 0x%08x.\n"), |
783 this)); |
741 this)); |
784 |
742 |
785 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::set_pac_store_password()"); |
743 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::set_pac_store_password()"); |
786 |
744 |
787 u32_t parameter_index(eap_message_payload_index_first_parameter); |
745 u32_t parameter_index(eap_message_payload_index_first_parameter); |
788 |
746 |
789 eap_process_tlv_message_data_c message_data(m_am_tools); |
747 eap_process_tlv_message_data_c message_data(m_am_tools); |
790 |
748 |
813 status = m_am_client->set_pac_store_password(password); |
771 status = m_am_client->set_pac_store_password(password); |
814 |
772 |
815 return status; |
773 return status; |
816 |
774 |
817 } |
775 } |
|
776 |
818 //-------------------------------------------------- |
777 //-------------------------------------------------- |
819 |
778 |
820 eap_status_e eap_pac_store_server_message_if_c::destroy_pac_store(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
779 eap_status_e eap_pac_store_server_message_if_c::destroy_pac_store(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const /* parameters */) |
821 { |
780 { |
822 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
781 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
823 |
782 |
824 eap_status_e status(eap_status_ok); |
783 eap_status_e status(eap_status_ok); |
825 |
784 |
826 EAP_TRACE_DEBUG( |
785 EAP_TRACE_DEBUG( |
827 m_am_tools, |
786 m_am_tools, |
828 EAP_TRACE_FLAGS_MESSAGE_DATA, |
787 TRACE_FLAGS_DEFAULT, |
829 (EAPL("eap_pac_store_server_message_if_c::destroy_pac_store(): this = 0x%08x.\n"), |
788 (EAPL("eap_pac_store_server_message_if_c::destroy_pac_store(): this = 0x%08x.\n"), |
830 this)); |
789 this)); |
831 |
790 |
832 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::destroy_pac_store()"); |
791 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_pac_store_server_message_if_c::destroy_pac_store()"); |
833 |
792 |
834 status = m_am_client->destroy_pac_store(); |
793 status = m_am_client->destroy_pac_store(); |
835 |
794 |
836 return status; |
795 return status; |
837 |
796 |
838 } |
797 } |
839 //-------------------------------------------------- |
798 |
840 |
799 //-------------------------------------------------- |
841 //-------------------------------------------------- |
800 |
842 |
801 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_master_key_present( |
843 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_open_pac_store(const eap_status_e completion_status) |
802 const bool is_present) |
844 { |
|
845 eap_status_e status(eap_status_process_general_error); |
|
846 |
|
847 EAP_TRACE_DEBUG( |
|
848 m_am_tools, |
|
849 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
850 (EAPL("%s: eap_core_server_message_if_c::complete_open_pac_store()\n"), |
|
851 (m_is_client == true) ? "client": "server")); |
|
852 |
|
853 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_open_pac_store()"); |
|
854 |
|
855 { |
|
856 // Creates message data composed of Attribute-Value Pairs. |
|
857 eap_process_tlv_message_data_c message(m_am_tools); |
|
858 |
|
859 if (message.get_is_valid() == false) |
|
860 { |
|
861 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
862 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
863 } |
|
864 |
|
865 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_open_pac_store); |
|
866 if (status != eap_status_ok) |
|
867 { |
|
868 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
869 return EAP_STATUS_RETURN(m_am_tools, status); |
|
870 } |
|
871 |
|
872 status = message.add_parameter_data(completion_status); |
|
873 if (status != eap_status_ok) |
|
874 { |
|
875 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
876 return EAP_STATUS_RETURN(m_am_tools, status); |
|
877 } |
|
878 |
|
879 status = send_message(&message); |
|
880 if (status != eap_status_ok) |
|
881 { |
|
882 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
883 return EAP_STATUS_RETURN(m_am_tools, status); |
|
884 } |
|
885 } |
|
886 |
|
887 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
888 return EAP_STATUS_RETURN(m_am_tools, status); |
|
889 } |
|
890 |
|
891 |
|
892 |
|
893 |
|
894 |
|
895 //-------------------------------------------------- |
|
896 |
|
897 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_create_device_seed( |
|
898 const eap_status_e completion_status) |
|
899 { |
803 { |
900 eap_status_e status(eap_status_process_general_error); |
804 eap_status_e status(eap_status_process_general_error); |
901 |
805 |
902 EAP_TRACE_DEBUG( |
806 EAP_TRACE_DEBUG( |
903 m_am_tools, |
807 m_am_tools, |
904 EAP_TRACE_FLAGS_MESSAGE_DATA, |
808 TRACE_FLAGS_DEFAULT, |
905 (EAPL("%s: eap_core_server_message_if_c::complete_create_device_seed()\n"), |
809 (EAPL("%s: eap_core_server_message_if_c::complete_is_master_key_present()\n"), |
906 (m_is_client == true) ? "client": "server")); |
810 (m_is_client == true) ? "client": "server")); |
907 |
811 |
908 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_create_device_seed()"); |
812 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_core_server_message_if_c::complete_is_master_key_present()"); |
909 |
813 |
910 { |
814 { |
911 // Creates message data composed of Attribute-Value Pairs. |
815 // Creates message data composed of Attribute-Value Pairs. |
912 eap_process_tlv_message_data_c message(m_am_tools); |
816 eap_process_tlv_message_data_c message(m_am_tools); |
913 |
817 |
915 { |
819 { |
916 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
820 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
917 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
821 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
918 } |
822 } |
919 |
823 |
920 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_create_device_seed); |
824 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_master_key_present); |
921 if (status != eap_status_ok) |
825 if (status != eap_status_ok) |
922 { |
826 { |
923 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
827 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
924 return EAP_STATUS_RETURN(m_am_tools, status); |
828 return EAP_STATUS_RETURN(m_am_tools, status); |
925 } |
829 } |
926 |
830 |
927 status = message.add_parameter_data(completion_status); |
831 status = message.add_parameter_data(is_present); |
928 if (status != eap_status_ok) |
832 if (status != eap_status_ok) |
929 { |
833 { |
930 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
834 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
931 return EAP_STATUS_RETURN(m_am_tools, status); |
835 return EAP_STATUS_RETURN(m_am_tools, status); |
932 } |
836 } |
941 |
845 |
942 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
846 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
943 return EAP_STATUS_RETURN(m_am_tools, status); |
847 return EAP_STATUS_RETURN(m_am_tools, status); |
944 |
848 |
945 } |
849 } |
946 //-------------------------------------------------- |
850 |
947 |
851 //-------------------------------------------------- |
948 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_master_key_present( |
852 |
949 const bool is_present) |
853 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_master_key_and_password_matching( |
|
854 const bool is_matching) |
950 { |
855 { |
951 eap_status_e status(eap_status_process_general_error); |
856 eap_status_e status(eap_status_process_general_error); |
952 |
857 |
953 EAP_TRACE_DEBUG( |
858 EAP_TRACE_DEBUG( |
954 m_am_tools, |
859 m_am_tools, |
955 EAP_TRACE_FLAGS_MESSAGE_DATA, |
860 TRACE_FLAGS_DEFAULT, |
956 (EAPL("%s: eap_core_server_message_if_c::complete_is_master_key_present()\n"), |
861 (EAPL("%s: eap_core_server_message_if_c::complete_is_master_key_and_password_matching()\n"), |
957 (m_is_client == true) ? "client": "server")); |
862 (m_is_client == true) ? "client": "server")); |
958 |
863 |
959 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_is_master_key_present()"); |
864 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_core_server_message_if_c::complete_is_master_key_and_password_matching()"); |
960 |
865 |
961 { |
866 { |
962 // Creates message data composed of Attribute-Value Pairs. |
867 // Creates message data composed of Attribute-Value Pairs. |
963 eap_process_tlv_message_data_c message(m_am_tools); |
868 eap_process_tlv_message_data_c message(m_am_tools); |
964 |
869 |
966 { |
871 { |
967 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
872 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
968 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
873 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
969 } |
874 } |
970 |
875 |
971 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_master_key_present); |
876 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_master_key_and_password_matching); |
972 if (status != eap_status_ok) |
877 if (status != eap_status_ok) |
973 { |
878 { |
974 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
879 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
975 return EAP_STATUS_RETURN(m_am_tools, status); |
880 return EAP_STATUS_RETURN(m_am_tools, status); |
976 } |
881 } |
977 |
882 |
978 status = message.add_parameter_data(is_present); |
883 status = message.add_parameter_data(is_matching); |
979 if (status != eap_status_ok) |
884 if (status != eap_status_ok) |
980 { |
885 { |
981 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
886 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
982 return EAP_STATUS_RETURN(m_am_tools, status); |
887 return EAP_STATUS_RETURN(m_am_tools, status); |
983 } |
888 } |
992 |
897 |
993 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
898 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
994 return EAP_STATUS_RETURN(m_am_tools, status); |
899 return EAP_STATUS_RETURN(m_am_tools, status); |
995 |
900 |
996 } |
901 } |
997 //-------------------------------------------------- |
902 |
998 |
903 //-------------------------------------------------- |
999 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_master_key_and_password_matching( |
904 |
1000 const bool is_matching) |
905 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_create_and_save_master_key( |
|
906 const eap_status_e completion_status) |
1001 { |
907 { |
1002 eap_status_e status(eap_status_process_general_error); |
908 eap_status_e status(eap_status_process_general_error); |
1003 |
909 |
1004 EAP_TRACE_DEBUG( |
910 EAP_TRACE_DEBUG( |
1005 m_am_tools, |
911 m_am_tools, |
1006 EAP_TRACE_FLAGS_MESSAGE_DATA, |
912 TRACE_FLAGS_DEFAULT, |
1007 (EAPL("%s: eap_core_server_message_if_c::complete_is_master_key_and_password_matching()\n"), |
913 (EAPL("%s: eap_core_server_message_if_c::complete_create_and_save_master_key()\n"), |
1008 (m_is_client == true) ? "client": "server")); |
914 (m_is_client == true) ? "client": "server")); |
1009 |
915 |
1010 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_is_master_key_and_password_matching()"); |
916 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_core_server_message_if_c::complete_create_and_save_master_key()"); |
1011 |
917 |
1012 { |
918 { |
1013 // Creates message data composed of Attribute-Value Pairs. |
919 // Creates message data composed of Attribute-Value Pairs. |
1014 eap_process_tlv_message_data_c message(m_am_tools); |
920 eap_process_tlv_message_data_c message(m_am_tools); |
1015 |
921 |
1017 { |
923 { |
1018 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
924 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1019 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
925 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
1020 } |
926 } |
1021 |
927 |
1022 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_master_key_and_password_matching); |
928 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_create_and_save_master_key); |
1023 if (status != eap_status_ok) |
929 if (status != eap_status_ok) |
1024 { |
930 { |
1025 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
931 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1026 return EAP_STATUS_RETURN(m_am_tools, status); |
932 return EAP_STATUS_RETURN(m_am_tools, status); |
1027 } |
933 } |
1028 |
934 |
1029 status = message.add_parameter_data(is_matching); |
935 status = message.add_parameter_data(completion_status); |
1030 if (status != eap_status_ok) |
936 if (status != eap_status_ok) |
1031 { |
937 { |
1032 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
938 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1033 return EAP_STATUS_RETURN(m_am_tools, status); |
939 return EAP_STATUS_RETURN(m_am_tools, status); |
1034 } |
940 } |
1043 |
949 |
1044 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
950 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1045 return EAP_STATUS_RETURN(m_am_tools, status); |
951 return EAP_STATUS_RETURN(m_am_tools, status); |
1046 |
952 |
1047 } |
953 } |
1048 //-------------------------------------------------- |
954 |
1049 |
955 //-------------------------------------------------- |
1050 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_create_and_save_master_key( |
956 |
1051 const eap_status_e completion_status) |
957 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_pacstore_password_present( |
|
958 const bool is_present) |
1052 { |
959 { |
1053 eap_status_e status(eap_status_process_general_error); |
960 eap_status_e status(eap_status_process_general_error); |
1054 |
961 |
1055 EAP_TRACE_DEBUG( |
962 EAP_TRACE_DEBUG( |
1056 m_am_tools, |
963 m_am_tools, |
1057 EAP_TRACE_FLAGS_MESSAGE_DATA, |
964 TRACE_FLAGS_DEFAULT, |
1058 (EAPL("%s: eap_core_server_message_if_c::complete_create_and_save_master_key()\n"), |
965 (EAPL("%s: eap_core_server_message_if_c::complete_is_pacstore_password_present()\n"), |
1059 (m_is_client == true) ? "client": "server")); |
966 (m_is_client == true) ? "client": "server")); |
1060 |
967 |
1061 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_create_and_save_master_key()"); |
968 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_core_server_message_if_c::complete_is_pacstore_password_present()"); |
1062 |
969 |
1063 { |
970 { |
1064 // Creates message data composed of Attribute-Value Pairs. |
971 // Creates message data composed of Attribute-Value Pairs. |
1065 eap_process_tlv_message_data_c message(m_am_tools); |
972 eap_process_tlv_message_data_c message(m_am_tools); |
1066 |
973 |
1068 { |
975 { |
1069 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
976 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1070 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
977 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
1071 } |
978 } |
1072 |
979 |
1073 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_create_and_save_master_key); |
980 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_pacstore_password_present); |
1074 if (status != eap_status_ok) |
981 if (status != eap_status_ok) |
1075 { |
982 { |
1076 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
983 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1077 return EAP_STATUS_RETURN(m_am_tools, status); |
984 return EAP_STATUS_RETURN(m_am_tools, status); |
1078 } |
985 } |
1079 |
986 |
1080 status = message.add_parameter_data(completion_status); |
987 status = message.add_parameter_data(is_present); |
1081 if (status != eap_status_ok) |
988 if (status != eap_status_ok) |
1082 { |
989 { |
1083 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
990 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1084 return EAP_STATUS_RETURN(m_am_tools, status); |
991 return EAP_STATUS_RETURN(m_am_tools, status); |
1085 } |
992 } |
1094 |
1001 |
1095 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1002 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1096 return EAP_STATUS_RETURN(m_am_tools, status); |
1003 return EAP_STATUS_RETURN(m_am_tools, status); |
1097 |
1004 |
1098 } |
1005 } |
1099 //-------------------------------------------------- |
1006 |
1100 |
1007 //-------------------------------------------------- |
1101 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_pacstore_password_present( |
1008 |
1102 const bool is_present) |
1009 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_compare_pac_store_password( |
|
1010 const bool is_matching) |
1103 { |
1011 { |
1104 eap_status_e status(eap_status_process_general_error); |
1012 eap_status_e status(eap_status_process_general_error); |
1105 |
1013 |
1106 EAP_TRACE_DEBUG( |
1014 EAP_TRACE_DEBUG( |
1107 m_am_tools, |
1015 m_am_tools, |
1108 EAP_TRACE_FLAGS_MESSAGE_DATA, |
1016 TRACE_FLAGS_DEFAULT, |
1109 (EAPL("%s: eap_core_server_message_if_c::complete_is_pacstore_password_present()\n"), |
1017 (EAPL("%s: eap_core_server_message_if_c::complete_compare_pac_store_password()\n"), |
1110 (m_is_client == true) ? "client": "server")); |
1018 (m_is_client == true) ? "client": "server")); |
1111 |
1019 |
1112 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_is_pacstore_password_present()"); |
1020 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_core_server_message_if_c::complete_compare_pac_store_password()"); |
1113 |
1021 |
1114 { |
1022 { |
1115 // Creates message data composed of Attribute-Value Pairs. |
1023 // Creates message data composed of Attribute-Value Pairs. |
1116 eap_process_tlv_message_data_c message(m_am_tools); |
1024 eap_process_tlv_message_data_c message(m_am_tools); |
1117 |
1025 |
1119 { |
1027 { |
1120 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1028 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1121 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
1029 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
1122 } |
1030 } |
1123 |
1031 |
1124 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_pacstore_password_present); |
1032 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_compare_pac_store_password); |
1125 if (status != eap_status_ok) |
1033 if (status != eap_status_ok) |
1126 { |
1034 { |
1127 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1035 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1128 return EAP_STATUS_RETURN(m_am_tools, status); |
1036 return EAP_STATUS_RETURN(m_am_tools, status); |
1129 } |
1037 } |
1130 |
1038 |
1131 status = message.add_parameter_data(is_present); |
1039 status = message.add_parameter_data(is_matching); |
1132 if (status != eap_status_ok) |
1040 if (status != eap_status_ok) |
1133 { |
1041 { |
1134 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1042 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1135 return EAP_STATUS_RETURN(m_am_tools, status); |
1043 return EAP_STATUS_RETURN(m_am_tools, status); |
1136 } |
1044 } |
1145 |
1053 |
1146 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1054 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1147 return EAP_STATUS_RETURN(m_am_tools, status); |
1055 return EAP_STATUS_RETURN(m_am_tools, status); |
1148 |
1056 |
1149 } |
1057 } |
1150 //-------------------------------------------------- |
1058 |
1151 |
1059 //-------------------------------------------------- |
1152 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_compare_pac_store_password( |
1060 |
1153 const bool is_matching) |
1061 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_set_pac_store_password( |
|
1062 const eap_status_e completion_status) |
1154 { |
1063 { |
1155 eap_status_e status(eap_status_process_general_error); |
1064 eap_status_e status(eap_status_process_general_error); |
1156 |
1065 |
1157 EAP_TRACE_DEBUG( |
1066 EAP_TRACE_DEBUG( |
1158 m_am_tools, |
1067 m_am_tools, |
1159 EAP_TRACE_FLAGS_MESSAGE_DATA, |
1068 TRACE_FLAGS_DEFAULT, |
1160 (EAPL("%s: eap_core_server_message_if_c::complete_compare_pac_store_password()\n"), |
1069 (EAPL("%s: eap_core_server_message_if_c::complete_set_pac_store_password()\n"), |
1161 (m_is_client == true) ? "client": "server")); |
1070 (m_is_client == true) ? "client": "server")); |
1162 |
1071 |
1163 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_compare_pac_store_password()"); |
1072 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_core_server_message_if_c::complete_set_pac_store_password()"); |
1164 |
1073 |
1165 { |
1074 { |
1166 // Creates message data composed of Attribute-Value Pairs. |
1075 // Creates message data composed of Attribute-Value Pairs. |
1167 eap_process_tlv_message_data_c message(m_am_tools); |
1076 eap_process_tlv_message_data_c message(m_am_tools); |
1168 |
1077 |
1170 { |
1079 { |
1171 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1080 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1172 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
1081 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
1173 } |
1082 } |
1174 |
1083 |
1175 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_compare_pac_store_password); |
1084 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_set_pac_store_password); |
1176 if (status != eap_status_ok) |
1085 if (status != eap_status_ok) |
1177 { |
1086 { |
1178 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1087 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1179 return EAP_STATUS_RETURN(m_am_tools, status); |
1088 return EAP_STATUS_RETURN(m_am_tools, status); |
1180 } |
1089 } |
1181 |
1090 |
1182 status = message.add_parameter_data(is_matching); |
1091 status = message.add_parameter_data(completion_status); |
1183 if (status != eap_status_ok) |
1092 if (status != eap_status_ok) |
1184 { |
1093 { |
1185 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1094 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1186 return EAP_STATUS_RETURN(m_am_tools, status); |
1095 return EAP_STATUS_RETURN(m_am_tools, status); |
1187 } |
1096 } |
1196 |
1105 |
1197 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1106 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1198 return EAP_STATUS_RETURN(m_am_tools, status); |
1107 return EAP_STATUS_RETURN(m_am_tools, status); |
1199 |
1108 |
1200 } |
1109 } |
1201 //-------------------------------------------------- |
1110 |
1202 |
1111 //-------------------------------------------------- |
1203 //-------------------------------------------------- |
1112 |
1204 |
1113 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_destroy_pac_store( |
1205 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_set_pac_store_password( |
1114 const eap_status_e completion_status) |
1206 const eap_status_e completion_status) |
|
1207 { |
1115 { |
1208 eap_status_e status(eap_status_process_general_error); |
1116 eap_status_e status(eap_status_process_general_error); |
1209 |
1117 |
1210 EAP_TRACE_DEBUG( |
1118 EAP_TRACE_DEBUG( |
1211 m_am_tools, |
1119 m_am_tools, |
1212 EAP_TRACE_FLAGS_MESSAGE_DATA, |
1120 TRACE_FLAGS_DEFAULT, |
1213 (EAPL("%s: eap_core_server_message_if_c::complete_set_pac_store_password()\n"), |
1121 (EAPL("%s: eap_core_server_message_if_c::complete_destroy_pac_store()\n"), |
1214 (m_is_client == true) ? "client": "server")); |
1122 (m_is_client == true) ? "client": "server")); |
1215 |
1123 |
1216 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_set_pac_store_password()"); |
1124 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_core_server_message_if_c::complete_destroy_pac_store()"); |
1217 |
1125 |
1218 { |
1126 { |
1219 // Creates message data composed of Attribute-Value Pairs. |
1127 // Creates message data composed of Attribute-Value Pairs. |
1220 eap_process_tlv_message_data_c message(m_am_tools); |
1128 eap_process_tlv_message_data_c message(m_am_tools); |
1221 |
1129 |
1249 |
1157 |
1250 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1158 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
1251 return EAP_STATUS_RETURN(m_am_tools, status); |
1159 return EAP_STATUS_RETURN(m_am_tools, status); |
1252 |
1160 |
1253 } |
1161 } |
1254 //-------------------------------------------------- |
1162 |
1255 |
1163 //-------------------------------------------------- |
1256 EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_destroy_pac_store( |
|
1257 const eap_status_e completion_status) |
|
1258 { |
|
1259 eap_status_e status(eap_status_process_general_error); |
|
1260 |
|
1261 EAP_TRACE_DEBUG( |
|
1262 m_am_tools, |
|
1263 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
1264 (EAPL("%s: eap_core_server_message_if_c::complete_destroy_pac_store()\n"), |
|
1265 (m_is_client == true) ? "client": "server")); |
|
1266 |
|
1267 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_destroy_pac_store()"); |
|
1268 |
|
1269 { |
|
1270 // Creates message data composed of Attribute-Value Pairs. |
|
1271 eap_process_tlv_message_data_c message(m_am_tools); |
|
1272 |
|
1273 if (message.get_is_valid() == false) |
|
1274 { |
|
1275 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1276 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1277 } |
|
1278 |
|
1279 status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_destroy_pac_store); |
|
1280 if (status != eap_status_ok) |
|
1281 { |
|
1282 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1283 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1284 } |
|
1285 |
|
1286 status = message.add_parameter_data(completion_status); |
|
1287 if (status != eap_status_ok) |
|
1288 { |
|
1289 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1290 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1291 } |
|
1292 |
|
1293 status = send_message(&message); |
|
1294 if (status != eap_status_ok) |
|
1295 { |
|
1296 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1297 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1298 } |
|
1299 } |
|
1300 |
|
1301 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1302 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1303 |
|
1304 } |
|
1305 //-------------------------------------------------- |
|
1306 |
|
1307 |
1164 |
1308 eap_am_pac_store_c* eap_am_pac_store_symbian_c::new_eap_am_pac_store_symbian_c( |
1165 eap_am_pac_store_c* eap_am_pac_store_symbian_c::new_eap_am_pac_store_symbian_c( |
1309 abs_eap_am_tools_c * const tools, |
1166 abs_eap_am_tools_c * const tools, |
1310 abs_eap_am_pac_store_c * const partner) |
1167 abs_eap_am_pac_store_c * const partner) |
1311 { |
1168 { |
1312 eap_am_pac_store_c *server = new eap_am_pac_store_symbian_c( |
1169 eap_am_pac_store_c *server = new eap_am_pac_store_symbian_c( |
1313 tools, partner); |
1170 tools, partner); |
1314 /* |
1171 |
1315 eap_automatic_variable_c<eap_am_pac_store_c> automatic_server( |
|
1316 tools, |
|
1317 server); |
|
1318 */ |
|
1319 if (server == 0) |
1172 if (server == 0) |
1320 { |
1173 { |
1321 EAP_TRACE_DEBUG( |
1174 EAP_TRACE_DEBUG( |
1322 tools, |
1175 tools, |
1323 TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, |
1176 TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, |