}
_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");
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;
}
_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);