[Non-ACR][Fix for TFIVE-2245] 02/179902/2 accepted/tizen_5.0_unified accepted/tizen/5.0/unified/20181102.012944 accepted/tizen/unified/20180523.155401 submit/tizen/20180523.101615 submit/tizen_5.0/20181101.000001
authorAbhishek Vijay <abhishek.v@samsung.com>
Wed, 23 May 2018 08:56:17 +0000 (14:26 +0530)
committerAbhishek Vijay <abhishek.v@samsung.com>
Wed, 23 May 2018 08:59:04 +0000 (14:29 +0530)
Change-Id: If546ecb73cf36bcc17795aaf7f8c0ec74b91bc19
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
src/oauth2_manager.c

index 89e84bfeddc6a450e64042f1b848a7c8daf892bb..53c71aa5c75a196fd9d7453c646149ed096b3dd2 100755 (executable)
@@ -120,7 +120,6 @@ __check_permission(void)
                         OAUTH2_LOG_E("fread() Fail(%d)", ret);
                         return 0;
                }
-               smack_label[ret] = '\0';
                snprintf(uid, sizeof(uid), "%d", getuid());
 
                ret = cynara_check(cynara_h, smack_label, "", uid, INTERNET_PRIVILEGE);
@@ -622,16 +621,13 @@ __curl_post_request(oauth2_manager_s *mgr_handle, const char *url,
                OAUTH2_LOG_I("__curl_post_request post body=[%s]", post_body);
 
        curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_URL, url);
-       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_SSL_VERIFYPEER, 1L);
-       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_SSL_CTX_FUNCTION, tpkp_curl_ssl_ctx_callback);
-       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_POSTFIELDS,
-               post_body);
+       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);/*1L);*/
+       /*curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_SSL_CTX_FUNCTION, tpkp_curl_ssl_ctx_callback);*/
+       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_POSTFIELDS, post_body);
        char *data = NULL;
-       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_WRITEDATA, data);
-       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_WRITEFUNCTION,
-               __store_curl_response);
-       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_SSL_VERIFYPEER,
-               FALSE);
+       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_WRITEDATA, &data);
+       curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_WRITEFUNCTION, __store_curl_response);
+       /*curl_easy_setopt(mgr_handle->curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);*/
 
        *curl_err = curl_easy_perform(mgr_handle->curl_handle);
        OAUTH2_LOG_I("Response id curl code=[%d]", *curl_err);