libcurl

Memcpy segfaulting with valid pointers

穿精又带淫゛_ 提交于 2021-02-17 02:16:08
问题 I'm using libcurl in my program, and running into a segfault. Before I filed a bug with the curl project, I thought I'd do a little debugging. What I found seemed very odd to me, and I haven't been able to make sense of it yet. First, the segfault traceback: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe77f6700 (LWP 592)] 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux

Memcpy segfaulting with valid pointers

房东的猫 提交于 2021-02-17 02:13:08
问题 I'm using libcurl in my program, and running into a segfault. Before I filed a bug with the curl project, I thought I'd do a little debugging. What I found seemed very odd to me, and I haven't been able to make sense of it yet. First, the segfault traceback: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe77f6700 (LWP 592)] 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux

operation was aborted by an application callback - libcurl

有些话、适合烂在心里 提交于 2021-02-11 15:27:56
问题 I have the following libcurl program. When I run the program I get the following error. Operation was aborted by an application callback Process finished with exit code 42 My complete program #include <stdio.h> #include <curl/curl.h> #include <cstdint> #include <malloc.h> #include <cstring> #define TIMETYPE double #define TIMEOPT CURLINFO_TOTAL_TIME #define STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES 6000 struct myprogress { TIMETYPE lastruntime; CURL *curl; }; struct memoryStruct { uint8_t* memory;

Public key pinning in curl does not work without using certificates from the system

冷暖自知 提交于 2021-02-08 09:34:07
问题 I am trying to use libcurl with public-key pinning in order to verify a server's authenticity when downloading a file. Curl is compiled so that it doesn't use any certificates on the system, but only relies on certificates it receives from the user: ./configure --without-ca-bundle --without-ca-path --without-ca-fallback && make First I obtain the sha256 sum of the server certificate's public key, as explained here: $ openssl s_client -servername www.example.com -connect www.example.com:443 <

PHP Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 2: easy handle already used in multi handle

懵懂的女人 提交于 2021-02-07 17:03:54
问题 I am a user not a developer. The developer is not available. This is the Google API library used in Google Shopping Products submission scripts. The scripts worked successfully, every 20 minutes, for 2 years + the first 5 hours of yesterday. Then the following error: [18-Apr-2020 06:20:03 Europe/London] PHP Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 2: easy handle already used in multi handle (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in ../vendor

TwitteR r package: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found

北战南征 提交于 2021-02-07 13:46:58
问题 I have updated my OS to Ubuntu 18.04 recently and twitteR R package is not working anymore. I am having the following error message during setup_twitter_oauth . > setup_twitter_oauth(api_key,api_secret) [1] "Using browser based authentication" Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/my-laptop/R/x86_64-pc-linux-gnu-library/3.4/curl/libs/curl.so': /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /home/my-laptop

libcurl returns error 3: URL using bad/illegal format or missing URL when using std::string variable [duplicate]

落花浮王杯 提交于 2021-02-07 10:17:29
问题 This question already has answers here : LibCurl CURLOPT_URL not accepting string? C++ (2 answers) Closed 2 years ago . I'm using libcurl and following the simple https GET tutorial from the libcurl website. When I hardcode the website URL when setting the CURLOPT_URL option, the request works: curl_easy_setopt(curl, CURLOPT_URL, "https://www.google.com/"); result = curl_easy_perform(curl); if (CURLE_OK != result) { fprintf(stderr, "HTTP REQ failed: %s\n", curl_easy_strerror(result)); }

libcurl returns error 3: URL using bad/illegal format or missing URL when using std::string variable [duplicate]

落花浮王杯 提交于 2021-02-07 10:12:23
问题 This question already has answers here : LibCurl CURLOPT_URL not accepting string? C++ (2 answers) Closed 2 years ago . I'm using libcurl and following the simple https GET tutorial from the libcurl website. When I hardcode the website URL when setting the CURLOPT_URL option, the request works: curl_easy_setopt(curl, CURLOPT_URL, "https://www.google.com/"); result = curl_easy_perform(curl); if (CURLE_OK != result) { fprintf(stderr, "HTTP REQ failed: %s\n", curl_easy_strerror(result)); }

Make git revert to SSLv3 when TLSv1 fails with “Ignored Unknown Record”

限于喜欢 提交于 2021-02-07 03:19:16
问题 Can't use git : git clone https://github.com/foo/bar fails: fatal: unable to access 'https://github.com/foo/bar': Unknown SSL protocol error in connection to github.com:443 How can I force git to use SSLv3? I tried to compile git from source, but there is no setting beyond: --with-openssl (default). Adding the following line before line 408 in remote-curl.c doesn't work either: curl_easy_setopt(slot->curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); Here are some clues: case 1 : When my

cURL does not work but same site works with browser

血红的双手。 提交于 2021-02-06 03:43:50
问题 what are the reasons for when using cURL form linux server to access the site return an error. but opening this site in chrome succeeds. 回答1: Look browsers headers while sending your request, and add same headers to cURL request. Some servers needs some headers that browsers sends default but not cURL. 回答2: To avoid/suppress SSL error, use -k flag, ie curl -k ... 回答3: I had 301 Moved Permanently error on curl but was working on browser. But when I looked deeper there's Location to moved to