req_info->temp_file_path = strdup(ext_data->temp_file_path);
if (ext_data->pkg_name)
req_info->pkg_name = strdup(ext_data->pkg_name);
- req_info->network_bonding = ext_data->network_bonding;
if (ext_data->user_req_data)
req_info->user_req_data = ext_data->user_req_data;
if (ext_data->user_client_data)
req_info->user_client_data = ext_data->user_client_data;
+
+ req_info->network_bonding = ext_data->network_bonding;
+ req_info->disable_verify_host = ext_data->disable_verify_host;
+
da_info->req_info = req_info;
}
if (da_cb_data) {
DA_LOGI("user_req_data[%p]", ext_data->user_req_data);
if (ext_data->user_client_data)
DA_LOGI("user_client_data[%p]", ext_data->user_client_data);
+ DA_LOGD("disable_verify_host[%d]", ext_data->disable_verify_host);
ret = get_available_da_id(&da_id);
if (ret != DA_RESULT_OK)
struct curl_httppost* post = NULL;
struct curl_slist *headers = DA_NULL;
char err_buffer[CURL_ERROR_SIZE] = {0,};
+ int disable_verify_host = 0;
DA_LOGV("");
#ifdef _RAF_SUPPORT
http_info = da_info->http_info;
NULL_CHECK_GOTO(http_info);
+ disable_verify_host = da_info->req_info->disable_verify_host;
+
http_method = http_info->http_method;
ret = init_http_msg_t(&http_msg);
if (ret != DA_RESULT_OK)
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, err_buffer);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, disable_verify_host ? 0L : 2L);
#ifdef _CA_CERT
curl_easy_setopt(curl, CURLOPT_CAINFO, _CA_CERT);
#endif
char *temp_file_path;
char *pkg_name;
int network_bonding;
+ int disable_verify_host;
void *user_req_data;
void *user_client_data;
} req_info_t;
const char *etag;
const char *pkg_name;
int network_bonding;
+ int disable_verify_host;
void *user_req_data;
void *user_client_data;
} req_data_t;
Name: download-provider
Summary: Download the contents in background
-Version: 2.1.119
+Version: 2.1.120
Release: 0
Group: Development/Libraries
License: Apache-2.0
{
return __dp_ipc_set_string(id, DP_SEC_UNSET, DP_PROP_HTTP_HEADER, field, __FUNCTION__);
}
+
+int dp_interface_set_verify_host(const int id, int enable)
+{
+ return __dp_ipc_set_int(id, DP_SEC_SET, DP_PROP_VERIFY_HOST,
+ enable, __FUNCTION__);
+}
EXPORT_API int dp_interface_get_notification_description(const int id, char **description);
EXPORT_API int dp_interface_set_notification_type(const int id, int type);
EXPORT_API int dp_interface_get_notification_type(const int id, int *type);
+
+EXPORT_API int dp_interface_set_verify_host(const int id, int enable);
#ifdef __cplusplus
}
#endif
return "HTTP_HEADERS";
case DP_PROP_HTTP_HEADER:
return "HTTP_HEADER";
+ case DP_PROP_VERIFY_HOST:
+ return "VERIFY_HOST";
default:
break;
}
free(header_value);
break;
}
+ case DP_PROP_VERIFY_HOST:
+ {
+ int recv_int = -1;
+ errorcode = __dp_request_read_int(client->channel, ipc_info, &recv_int);
+ if (errorcode == DP_ERROR_NONE) {
+ if (requestp != NULL)
+ requestp->disable_verify_host = recv_int ? 0 : 1;
+ }
+ break;
+ }
default:
errorcode = DP_ERROR_INVALID_PARAMETER;
break;
} else
req_data->network_bonding = user_network_bonding;
+ req_data->disable_verify_host = base_req->disable_verify_host;
req_data->pkg_name = base_slot->pkgname;
// get headers list from header table(DB)
dp_content_type content_type;
int noti_type;
int noti_priv_id;
+ int disable_verify_host; // tv only, internal API
void *next;
} dp_request_fmt;
DP_PROP_PAUSE,
DP_PROP_CANCEL,
DP_PROP_DESTROY,
+ DP_PROP_VERIFY_HOST
} dp_ipc_property_defs;
typedef enum {