libcurl

How to use libcurl as a static library with cmake?

a 夏天 提交于 2019-12-11 11:44:14
问题 I have googled around and can not figure this out. I am trying to learn c++. But my project requires libcurl to work. Now I have not been able after hours of googling for this issue to figure out how I can statically link the libcurl library with my project using cmake. I am developing on Windows 10 64 bit. I believe I am missing quite a few ideas of how exactly everything works with libraries in c++. I could find a few answers partially answering my question but nothing that I could piece

SSL CA Certificates - LibCurl C Language (Linux)

你离开我真会死。 提交于 2019-12-11 11:19:11
问题 Im working with a WebService and I still cannot authenticate peer certificates. Im using libCurl to C language, this is the output: Cannot Perform Post, Err: Peer certificate cannot be authenticated with given CA certificates So I've tried to test connection through openssl command: openssl s_client -connect homnfce.sefaz.am.gov.br:443 -cert cert.pem -key nfcek.pem Then : Verify return code: 20 (unable to get local issuer certificate) Going further I looked around to server certificates, and

curl to resuse https connection sessions

半城伤御伤魂 提交于 2019-12-11 10:01:57
问题 I have built curl with openssl and I am able to execute the https connection . Now every time when curl make TLS connection it makes handshake again . I need to make use of the client with previous connection session ID of the server and use it in next request . I have tried the below option but still its making the new handshake for every try curl_easy_setopt(curl, CURLOPT_URL, https://127.0.0.1); curl_easy_setopt(curl, CURLOPT_WRITEHEADER, headerfile); curl_easy_setopt(curl,CURLOPT

How properly create oauth signature base string?

蓝咒 提交于 2019-12-11 09:47:26
问题 I want to implement OAuth 1.0 protocol in order to work with COPY. But when i implemented OAuth protocol in C++ in order to get Request Token and sent that request to copy it's return that signature is invalid and i can't figure out what's wrong in my signature. Here are all parameters that i generate by my program: oauth_nonce=xoviybpokqnxdwlnkeoorawfijgezr oauth_timestamp=1381745375 oauth_callback=http%3A%2F%2Fcopy-oauth.local%2Fget_access_token.php oauth_signature_method=HMAC-SHA1 This is

How do I kill the popup?

老子叫甜甜 提交于 2019-12-11 08:45:21
问题 If you edit the following code to have valid certificate paths and a url that requires client certificates and then compile it with clang++ -lcurl curl.cpp on OS X (I'm using El Cap, but I think Mavericks or later behave the same way), and run the executable, you get a popup (shown below) from OS X asking if you want to allow the executable to use a private key in your keychain. This is annoying to users that know what's going on (internally curl on OS X uses the OS X security framework to

libcurl (linux, C) - Is there a built-in way to POST/PUT a gzipped request?

瘦欲@ 提交于 2019-12-11 08:34:33
问题 I want to perform a HTTP POST and/or PUT (using libcurl) with the request being compressed using GZIP. I haven't been able to find any native support for this in libcurl, and am wondering if I just haven't found the correct documentation or if there really is no support for this? (ie. Will I have to implement my own wrapper to gzip the request body?) 回答1: HTTP has no "automatic" or negotiated compression for requests, you need to do them explicitly by yourself before sending the data. Also, I

Linker errors when statically linking libcurl+openssl to my project

被刻印的时光 ゝ 提交于 2019-12-11 07:41:43
问题 I am trying to statically link libcurl (with SSL) into my project, but I am encountering lots of linker errors: ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xa9c): undefined reference to `CreateDCA@16' ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaa9): undefined reference to `CreateCompatibleDC@4' ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaba): undefined reference to `GetDeviceCaps@8' ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaca): undefined reference to

Is there any compression available in libcurl

佐手、 提交于 2019-12-11 07:31:43
问题 I need to transfer a huge file from local machine to remote machine using libcurl with C++. Is there any compression option available in-built with libcurl. As the data to be transferred is large (100 MB to 1 GB in size), it would be better if we have any such options available in libcurl itself. I know we can compress the data and send it via libcurl. But just want to know is there any better way of doing so. Note: In my case, many client machines transfer such huge data to remote server at

Converting from standard cookie format to LibCurl cookie jar format

岁酱吖の 提交于 2019-12-11 06:59:49
问题 Is there any convenient tool/code that converts the standard cookie string format , e.g., NAME1: VALUE1; NAME2: VALUE2 to the libCURL cookie jar format , e.g., .netscape.com TRUE / FALSE 946684799 NETSCAPE_ID 100103 LibCurl seems to have such functionality and how to access it, like using shell command? 回答1: The chrome extension, edit this cookie has such functionality. Cookies can be exported into the Netscape cookie jar format. Before that, you need to set the default output format to

Delayed responses for cURL SSL PUTs/POSTs (php) (NSS vs OpenSSL)

荒凉一梦 提交于 2019-12-11 06:11:09
问题 I have two Fedora-based apache webservers making the same SSL PUT/POST calls with php/cURL. One works fine, but with the other the call succeeds but takes a VERY long time to return a response (~10 min). (GETs don't seem affected) The working server's cURL uses OpenSSL for SSL, while the non-working version uses a later version of cURL that uses NSS for SSL I know nothing about SSL implementations or their effect on cURL. What would cause such a significant delay in SSL PUT/POST responses?