From: jkjo92 Date: Wed, 8 Feb 2017 08:20:47 +0000 (+0900) Subject: sync with tizen_3.0 X-Git-Tag: accepted/tizen/common/20170223.182359 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Faccepted%2Ftizen%2Fcommon%2F20170223.182359;p=platform%2Fcore%2Faccount%2Ffido-client.git sync with tizen_3.0 Change-Id: I8d9f11394b8791ea9e3596f00118198ce4900089 Signed-off-by: jkjo92 --- diff --git a/client/fido_uaf_client.c b/client/fido_uaf_client.c index c835904..8a35127 100755 --- a/client/fido_uaf_client.c +++ b/client/fido_uaf_client.c @@ -91,10 +91,6 @@ _fido_uaf_process_operation_reply(GObject *object, GAsyncResult *res, gpointer u } _fido_process_cb_data_s *cb_data = (_fido_process_cb_data_s *)user_data; - if (cb_data == NULL) { - _ERR("Can not proceed since callback data is NULL"); - return; - } if (cb_data->cb == NULL) { _ERR("Can not proceed since callback data's cb part is NULL"); @@ -324,8 +320,6 @@ fido_uaf_set_server_result(int response_code, const char *uaf_response_json) return FIDO_ERROR_NOT_SUPPORTED; } - GError *dbus_err = NULL; - int tizen_error_code = FIDO_ERROR_NONE; _response_t *uaf_res_data = _uaf_parser_parse_uaf_response(uaf_response_json); @@ -363,9 +357,6 @@ fido_uaf_set_server_result(int response_code, const char *uaf_response_json) if (is_success == FALSE) { _ERR("fido_call_fido_uaf_notify_result_sync failed [%d]", tizen_error_code); - if (dbus_err) - _ERR("GError = [%s]", dbus_err->message); - return FIDO_ERROR_PROTOCOL_ERROR; } diff --git a/server/fido_asm_plugin_manager.c b/server/fido_asm_plugin_manager.c old mode 100644 new mode 100755 index 137ab82..d812e34 --- a/server/fido_asm_plugin_manager.c +++ b/server/fido_asm_plugin_manager.c @@ -315,10 +315,6 @@ _on_asm_dbus_reply(GObject *proxy, GAsyncResult *res, gpointer user_data) } _asm_ipc_cb_data_t *cb_data = (_asm_ipc_cb_data_t *)user_data; - if (cb_data == NULL) { - _ERR("Can not proceed since callback data is NULL"); - return; - } if (cb_data->cb == NULL) { _ERR("Can not proceed since callback data's cb part is NULL"); @@ -477,6 +473,6 @@ _asm_ipc_send_sync(const char *asm_id, const char *asm_req) //g_variant_unref (_ret); -CATCH : +CATCH: return asm_res_json; } diff --git a/server/fido_selection_ui_adaptor.c b/server/fido_selection_ui_adaptor.c old mode 100644 new mode 100755 index 1a7cc94..a7fc435 --- a/server/fido_selection_ui_adaptor.c +++ b/server/fido_selection_ui_adaptor.c @@ -427,8 +427,7 @@ __get_proc_path_of_dbus_caller(GDBusMethodInvocation *invocation) connection = g_dbus_method_invocation_get_connection(invocation); if (connection == NULL) { - _ERR("Failed to open connection for the invocation [%s]", error->message); - g_error_free(error); + _ERR("Failed to open connection for the invocation"); return NULL; } diff --git a/server/fido_server.c b/server/fido_server.c index 09bafc1..65b2a2b 100755 --- a/server/fido_server.c +++ b/server/fido_server.c @@ -914,28 +914,29 @@ _discover_response_cb_for_process(int tz_error_code, int error_code, GList *avai _INFO("_PROCESS_TYPE_CHECK_POLICY for auth"); } - if (policy->is_keyid_present == true) { - /*Available authenticators' keyIDs can be fetched via GetRegistrations ASM op*/ - _INFO("Need to call GetRegistrations to match policy"); - GList *avl_auth_list_full_temp = __get_auth_list_with_keyids(policy, available_authenticators); - if (avl_auth_list_full_temp != NULL) { - g_list_free(available_authenticators_full); - - available_authenticators_full = g_list_first(avl_auth_list_full_temp); - } - - } - GList *allowed_auth_list = _policy_checker_get_matched_auth_list(policy, available_authenticators_full); - g_list_free_full(available_authenticators_full, _free_asm_auth_list); + if (policy != NULL) { + if (policy->is_keyid_present == true) { + /*Available authenticators' keyIDs can be fetched via GetRegistrations ASM op*/ + _INFO("Need to call GetRegistrations to match policy"); + GList *avl_auth_list_full_temp = __get_auth_list_with_keyids(policy, available_authenticators); + if (avl_auth_list_full_temp != NULL) { + g_list_free(available_authenticators_full); + + available_authenticators_full = g_list_first(avl_auth_list_full_temp); + } - if ((allowed_auth_list != NULL) && g_list_length(allowed_auth_list) > 0) - _send_process_response(cb_data, FIDO_ERROR_NONE, NULL); - else - _send_process_response(cb_data, FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR, NULL); + } + GList *allowed_auth_list = _policy_checker_get_matched_auth_list(policy, available_authenticators_full); + g_list_free_full(available_authenticators_full, _free_asm_auth_list); - if (allowed_auth_list != NULL) - g_list_free_full(allowed_auth_list, _free_matched_auth_data); + if ((allowed_auth_list != NULL) && g_list_length(allowed_auth_list) > 0) + _send_process_response(cb_data, FIDO_ERROR_NONE, NULL); + else + _send_process_response(cb_data, FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR, NULL); + if (allowed_auth_list != NULL) + g_list_free_full(allowed_auth_list, _free_matched_auth_data); + } } else if (strcmp(cb_data->uaf_req->header->operation, _UAF_OPERATION_NAME_KEY_DE_REG) == 0) { _dereg_request_t *dereg_req = (_dereg_request_t*)(cb_data->uaf_req->data); diff --git a/test/Dummy_ASM_DBUS/dummy_asm_server.c b/test/Dummy_ASM_DBUS/dummy_asm_server.c old mode 100644 new mode 100755 index 183c25f..ad87871 --- a/test/Dummy_ASM_DBUS/dummy_asm_server.c +++ b/test/Dummy_ASM_DBUS/dummy_asm_server.c @@ -102,8 +102,7 @@ __get_proc_path_of_dbus_caller(GDBusMethodInvocation *invocation) connection = g_dbus_method_invocation_get_connection(invocation); if (connection == NULL) { - _ERR("Failed to open connection for the invocation [%s]", error->message); - g_error_free(error); + _ERR("Failed to open connection for the invocation"); return NULL; }