Jenkins, Peter (SLSA | 20 Aug 06:28 2014
Picon
Picon

How to configure curl with libssh2

I want to use curl to download files from a sftp server and if I am reading the documentation correctly, curl
needs libssh2.

The curl version installed in OS X 10.9.4:
    curl 7.30.0 (x86_64-apple-darwin13.0) libcurl/7.30.0 SecureTransport zlib/1.2.5
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
    Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz 

As there is no libbssh2, I installed libssh2-1.4.3 and now I have new folders and various libssh2 files in /usr/local.

I guessed that I would have to install a new version of curl that includes libbssh2.
From the documentation I expect this curl to install in /usr/local, which would seem to match well with my
libssh2 install.

I ran the command ./configure --with-darwinssl --with-libssh2
and got this error:
    configure: error: libSSH2 libs and/or directories were not found where specified

I didn’t specify where to find "libSSH2 libs and/or directories”, assuming that /usr/local would be
the default.
Neither the output nor the config.log indicate where configure was looking.

How do I fix this?

Am I on the right track anyway?

Peter Jenkins
State Library of South Australia

-------------------------------------------------------------------
(Continue reading)

Gisle Vanem | 19 Aug 20:51 2014
Picon

Making curl.exe UNICODE aware

The libcurl.dll works fine when compiled with -DUNICODE,
but the curl.exe tool doesn't work at all. I was getting 
'curl (27): No memory' on all URLs. The easy fix for me was to 
explicitly call the ASCII version for the below functions. 

Patch:

--- orig/src/tool_homedir.c        2014-04-18 19:21:58 +0000
+++ src/tool_homedir.c    2014-08-19 19:55:07 +0000
 <at>  <at>  -39,14 +39,14  <at>  <at> 
   /* Don't use getenv(); it doesn't find variable added after program was
    * started. Don't accept truncated results (i.e. rc >= sizeof(buf1)).  */

-  rc = GetEnvironmentVariable(variable, buf1, sizeof(buf1));
+  rc = GetEnvironmentVariableA(variable, buf1, sizeof(buf1));
   if(rc > 0 && rc < sizeof(buf1)) {
     env = buf1;
     variable = buf1;
   }
   if(do_expand && strchr(variable,'%')) {
     /* buf2 == variable if not expanded */
-    rc = ExpandEnvironmentStrings (variable, buf2, sizeof(buf2));
+    rc = ExpandEnvironmentStringsA (variable, buf2, sizeof(buf2));
     if(rc > 0 && rc < sizeof(buf2) &&
        !strchr(buf2,'%'))    /* no vars still unexpanded */
       env = buf2;
--- orig/src/tool_parsecfg.c       2014-04-18 19:21:58 +0000
+++ src/tool_parsecfg.c   2014-08-19 19:54:44 +0000
 <at>  <at>  -79,7 +79,7  <at>  <at> 
            * already declared via inclusions done in setup header file.
(Continue reading)

antispammbox-debian | 14 Aug 12:42 2014
Picon

Re: Download from Url malformed?


> Message: 6
> Date: Thu, 14 Aug 2014 11:26:57 +0200 (CEST)
> From: Daniel Stenberg <daniel <at> haxx.se>
> To: the curl tool <curl-users <at> cool.haxx.se>
> Subject: Re: Download from Url malformed?
> Message-ID: <alpine.DEB.2.00.1408141125000.13430 <at> tvnag.unkk.fr>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Thu, 14 Aug 2014, antispammbox-debian wrote:
>
> Hello!
>
> Please note that the curl-library mailing list is more suitable for
> libcurl
> stuff. This list is for discussing the curl command line tool.
>
>> I trying from malformed? Url  with:
>> CURL *curl_handle;
>> FILE *pagefile;
>> curl_global_init(CURL_GLOBAL_ALL);
>> curl_handle = curl_easy_init();
>> curl_easy_setopt(curl_handle, CURLOPT_URL, Linkout);
>>
>> But donwload fails!
>
> What libcurl version on what platform?
>

Windows and Curl  -from: C:/MinGW/include/curl/curlver.h - "7.31.0"
(Continue reading)

antispammbox-debian | 14 Aug 11:14 2014
Picon

Download from Url malformed?


Hi all

I trying from malformed? Url  with:
CURL *curl_handle;
FILE *pagefile;
curl_global_init(CURL_GLOBAL_ALL);
curl_handle = curl_easy_init();
curl_easy_setopt(curl_handle, CURLOPT_URL, Linkout);

But donwload fails!

Is possible download from url like this:
http://www.aeiou.it/aeiou-gis/FrameTelecamera?tlc=33&tipo=F&ids=2f8d51e3&index=2
or to use some special option?

Thanks

Regards

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

curl --cacert doesn't work...

Hi,

curl 7.21.7 for OpenWrt has a bug.

I saved the server certificate from dtdns.com.

openssl s_client -connect dtdns.com:443

-----BEGIN CERTIFICATE-----
MIIFEDCCA/igAwIBAgIQJThbzaGldp+nET3eK30oEzANBgkqhkiG9w0BAQUFADBZ
MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
MScwJQYDVQQDEx5OZXR3b3JrIFNvbHV0aW9ucyBEViBTZXJ2ZXIgQ0EwHhcNMTIw
NDI4MDAwMDAwWhcNMTYwNDI4MjM1OTU5WjBdMSEwHwYDVQQLExhEb21haW4gQ29u
dHJvbCBWYWxpZGF0ZWQxIDAeBgNVBAsTF25zUHJvdGVjdCBTZWN1cmUgWHByZXNz
MRYwFAYDVQQDEw13d3cuZHRkbnMuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAu2HGjPVt4sAfPRoUVnB1XUZFxpFgGGFIkNIsg6zVG51/4dsU5mBV
+Ar3vVdK86zo7Y2ILp6bPh3adwpimBpZESUC6CmFE81PLGo3EaYv0wHUxgikhkgf
E2JhLvJUr/OuTzNtI0xbnQQMYJZu4DmIYm0qKSCucJo8Tg9Atn7HefyOoO0DdC6Q
PCp5quh3x9NOzm0Mip56BL9J5bMJo+6SZgx82N4zCkjc1dU0LZNsM+b5YTbUAN6T
oEauDFQfpI5FVLjvh7Gzv+lBPG4KLFOPdhUebQ8s7ZAsQTjX+ZuTvqtrmZbIO9rb
l8oUBmOVMFBJ24Dm1cFkMXmmz7owG9DKdwIDAQABo4IBzjCCAcowHwYDVR0jBBgw
FoAUWNglkqRVWm7Zo9GjfAyqBCFxLmAwHQYDVR0OBBYEFAJqD4oqiwRDOfl1xbJR
Ro+OyjjDMA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAAMB0GA1UdJQQWMBQG
CCsGAQUFBwMBBggrBgEFBQcDAjBrBgNVHSAEZDBiMGAGDCsGAQQBhg4BAgEJATBQ
ME4GCCsGAQUFBwIBFkJodHRwOi8vd3d3Lm5ldHdvcmtzb2x1dGlvbnMuY29tL2xl
Z2FsL1NTTC1sZWdhbC1yZXBvc2l0b3J5LWNwcy5qc3AwSAYDVR0fBEEwPzA9oDug
OYY3aHR0cDovL2NybC5uZXRzb2xzc2wuY29tL05ldHdvcmtTb2x1dGlvbnNEVlNl
cnZlckNBLmNybDB6BggrBgEFBQcBAQRuMGwwQwYIKwYBBQUHMAKGN2h0dHA6Ly93
d3cubmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zRFZTZXJ2ZXJDQS5jcnQw
JQYIKwYBBQUHMAGGGWh0dHA6Ly9vY3NwLm5ldHNvbHNzbC5jb20wGAYDVR0RBBEw
D4INd3d3LmR0ZG5zLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAKN+hFUT/S08uumKa
ULxAhuWUPh+wN+mR+P/3m8NgW7XP2KT5cauJAZL6hkuYZpP1Jdi3jTWzxqVFHi6I
ZtSLmNveo2bHQe8yvTWdUDPVxf16rAebO5vL4FXqfVX/Zbt6WBtav1Aon3tRFFFf
eutML/iv1zyt5r926mJLK9/f54YGomVLb1pE7w/z3iC+6F/UQAOKM9bii5XX5ZNk
qRiznqJdKDSiDvZNb7OvVcT86idCodg+POLOJSM4hpN9wUnCBdZqesL5pV95hctI
2h2vzoDAZNaVgaJjwJ9wxl/UvE8hfEZjFgmMc5JYxfYP0Rn2wtcdUa/2Jciqv2A3
s1tC8A==
-----END CERTIFICATE-----

Then I tried this on Ubuntu:

Ubuntu:

user <at> PC:~$ curl --version
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
user <at> PC:~$
user <at> PC:~$ curl --cacert DTDNS.crt -X GET 'https://www.dtdns.com/api/autodns.cfm?id=....&pw=....&ip=....'

It works - curl checks if the server certificate is the same like.

Then I tried the same on OpenWrt 10.03.1, r29592:

root <at> Router:~# curl --version
curl 7.21.7 (mips-openwrt-linux-gnu) libcurl/7.21.7 OpenSSL/0.9.8r zlib/1.2.3
Protocols: file ftp ftps http https imap imaps pop3 pop3s rtsp smtp smtps tftp
Features: IPv6 Largefile NTLM SSL libz
root <at> Router:~#

root <at> Router:/etc# curl --cacert DTDNS.crt -X GET 'https://www.dtdns.com/api/autodns.cfm?id=....&pw=....&ip=....'
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:lib(20):func(144):reason(134)
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
root <at> Router:/etc#

When I use -k it works but I want the more secure method! :-)

Best Regards,
Manuela
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
leah | 13 Aug 19:02 2014

cURL with CyaSSL, cURL logo usage

Hi,

I have recently developed a bbappend file for building the cURL OpenEmbedded recipe with CyaSSL and am writing a document describing the usage. I am wanting to utilize the cURL logo in this document. Is this a possibility? If so, how may I obtain copies of the logo?

Thanks!

Leah Thompson
Skype: lchristina26
+1 406 570 1389
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Alastair Scobie | 12 Aug 11:05 2014
Picon
Picon

Difference in curl performance between RHEL6 and RHEL7

Whilst porting an in-house application, which uses libcurl, from RHEL6 
to RHEL7 we noticed that the time taken by libcurl to fetch a page had 
substantially increased. Even an attempt at fetching a non-existent page 
has increased from 10-20ms to around 150ms. This with just plain HTTP.

Our first thought was that the API has changed in some subtle way and 
the fault must be in our code, but then we thought to try measuring the 
performance of the curl tool itself. To our surprise, we found the same 
performance disparity.

Interestingly...

* Adding the DNS address of the HTTP server to /etc/hosts (and 
specifying files,dns in /etc/nsswitch.conf) does not improve things

* but, performance when using an IP address in the URL is fine (~ 
10-20ms) for both RHEL6 and RHEL7

... which kind of suggests that the delay is in libcurl's DNS code 
rather than in the upstream resolver.

We did notice that when using DNS names in the URL, curl forks off a 
process to do the name lookup and then poll()s. There's no such fork 
when using an IP address in the URL. The poll() timesout after a period 
of time - we suspect this is the cause of the delay.

Any help would be very gratefully received!

(FYI - RHEL6 curl is 7.19, RHEL7 curl is 7.29)

Thanks, Alastair Scobie

School of Informatics
University of Edinburgh

--

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Beatrix Willius | 11 Aug 16:32 2014
Picon
Picon

"Authentication failed" when trying to connect to Imap account

Hi,

Curl newbie here. I'm trying to connect to one of my Imap test accounts via Curl. It's works fine when using
Python's imaplib, but Curl gives me an "Authentication failed" error. The server I'm trying to connect to
a plain vanilla Kerio server.

Using Mac OS 10.9.4, Curl on Xojo via MBS plugin.

Here is the output from Curl:

Rebuilt URL to: imap://macsend.de/
Hostname was NOT found in DNS cache
  Trying 46.253.112.9...
Connected to macsend.de (46.253.112.9) port 143 (#0)
* OK Kerio Connect 8.3.0 IMAP4rev1 server ready
A001 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 IDLE ACL LITERAL+ UIDPLUS QUOTA ID SORT ANNOTATE ANNOTATEMORE
STATUS-COUNTERS UNSELECT LISTEXT NAMESPACE XLIST SPECIAL-USE STARTTLS AUTH=CRAM-MD5 AUTH=PLAIN
AUTH=LOGIN AUTH=DIGEST-MD5
A001 OK CAPABILITY completed
A002 AUTHENTICATE DIGEST-MD5
+ cmVhbG09Im1haWwubWFjc2VuZC5kZSIsbm9uY2U9IjJCdXNneERWOGtWaExsc0MvbVhCaEE9PSIscW9wPSJhdXRoIixhbGdvcml0aG09bWQ1LXNlc3M=
dXNlcm5hbWU9ImJ3IixyZWFsbT0ibWFpbC5tYWNzZW5kLmRlIixub25jZT0iMkJ1c2d4RFY4a1ZoTGxzQy9tWEJoQT09Iixjbm9uY2U9ImRiZjQ5ODU3IixuYz0iMDAwMDAwMDEiLGRpZ2VzdC11cmk9ImltYXAvbWFpbC5tYWNzZW5kLmRlIixyZXNwb25zZT1iNDM0MDllN2YxNjM1MmY5N2RjNzQ3ZDMwMmM5ZDI1ZA==
A002 NO Authentication failed
Authentication failed: 78
Closing connection 0

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Deepak Singh | 7 Aug 07:06 2014

Fwd: Re: Re: Re: Re: Re: cURL TODO : 15.3 prevent file overwriting

Dear Daniel,

I have provided the patch sometime back, it is still in pending state.

It would be great if you can review and provide your inputs on the solution provided.

Once this patch is accepted I have a plan to provided few test cases for the same problem.

 

Thanks & Regards,

Deepak Singh

 

------- Original Message -------

Sender : Deepak Singh<deepak.sn <at> samsung.com> Lead Engineer (2)/SRI-Delhi-Linux/Samsung Electronics

Date : Jun 17, 2014 12:09 (GMT+05:30)

Title : Re: Re: Re: Re: Re: cURL TODO : 15.3 prevent file overwriting

 

>> I tried to solve the problems suggested by you, please find attached the
>> patch with the solutions of problems.

>Thanks, but this doesn't seem to work your patch:

> $ curl --no-clobber -o moo localhost/moo

> Also, you seem to intend that this option should be used once per given URL so
> you should then also make sure that this works:

> $ curl --no-clobber --no-clobber -o moo -O localhost/moo localhost/moo

I agree with your suggestions and made the required changes in the patch attached hereby.

Please share your opinion on the changes made.

 

Thanks & Regards,

Deepak Singh

 

 

 

Attachment (my-fixes.diff): application/octet-stream, 8 KiB
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Madhavi Gundeti | 1 Aug 07:53 2014
Picon

Re: curl-users Digest, Vol 107, Issue 12

Hi Daniel Stenberg,

> My application is working without any issues on Mavericks and Mountain Lion.

>... those are versions that still used curl built with OpenSSL, aren't they?
Ans:
Yes, Mavericks and Mountain Lion versions are using Curl 7.30 with OpenSSL.
Direct install of my application is working perfectly fine.
But If I upgrade Mountain Lion with my application to Mavericks then again I am getting curl 35 error.

>libssl and libcrypto are for OpenSSL. What does "added the latest version"
>mean exactly? Did you build the latest curl from source?
Ans:
No. I downloaded latest libcurl.4 from "http://www.hmug.org/pub/MacOS_X/BSD/Applications/Internet/curl/".
And added to Xcode project then rebuilt my application and tested. But No use.

And I upgrade the curl version from 7.30 to 7.37 on Yosemite Beta. Still I am facing the same error 56.

Here I am facing 2 curl errors in 2 different cases.
Case 1. During upgrades from Mountain Lion to Mavericks -- Error 35.
       This problem I solved temporarily by adding "sslv3" version to my curl call. And I wrote a while loop for continuous curl request.
      Ex: curl -v -3 "My server URL" -- Repeating this call 10 times.
     But curl call is successful after 4 to 5 minutes.

Case 2. On Yosemite alone, Direct install of my application is failing with Error 56.
No solution.


 Please suggest me to resolve these issues.



Thanks and Regards,
Madhavi G.


On Thu, Jul 31, 2014 at 3:30 PM, <curl-users-request <at> cool.haxx.se> wrote:
Send curl-users mailing list submissions to
        curl-users <at> cool.haxx.se

To subscribe or unsubscribe via the World Wide Web, visit
        http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
or, via email, send a message with subject or body 'help' to
        curl-users-request <at> cool.haxx.se

You can reach the person managing the list at
        curl-users-owner <at> cool.haxx.se

When replying, please edit your Subject line so it is more specific
than "Re: Contents of curl-users digest..."


Today's Topics:

   1. Re: Curl error code 35 after Mac OS upgrade from Mountain
      Lion to Mavericks (Daniel Stenberg)


----------------------------------------------------------------------

Message: 1
Date: Thu, 31 Jul 2014 10:50:56 +0200 (CEST)
From: Daniel Stenberg <daniel <at> haxx.se>
To: the curl tool <curl-users <at> cool.haxx.se>
Subject: Re: Curl error code 35 after Mac OS upgrade from Mountain
        Lion to Mavericks
Message-ID: <alpine.DEB.2.00.1407311034330.8987 <at> tvnag.unkk.fr>
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

On Wed, 30 Jul 2014, Madhavi Gundeti wrote:

>> User-Agent: curl/7.30.0

> * Closing connection 0
> curl: (56) SSLRead() return error -9806

This is an error code returned from darwinssl's SSLRead() function. I don't
think there's a lot we can do about it.

It might be interesting to grep their include files to figure out what -9806
actually means.

> My application is working without any issues on Mavericks and Mountain Lion.

... those are versions that still used curl built with OpenSSL, aren't they?

> I  added the latest version of libcurl and libssl and libcrypto to my
> project and tested .. still same problem I am facing.

libssl and libcrypto are for OpenSSL. What does "added the latest version"
mean exactly? Did you build the latest curl from source?

--

  / daniel.haxx.se


------------------------------

Subject: Digest Footer

_______________________________________________
curl-users mailing list
curl-users <at> cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users


------------------------------

End of curl-users Digest, Vol 107, Issue 12
*******************************************

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Simon Alexander | 25 Jul 23:27 2014
Picon

Can you force a connection to close via the command line?

Is there anyway to force the closure of a connection using the curl command line?

We have a situation where after performing a curl sftp upload of a file, we get the message "Connection #0 to host left intact" and then the command hangs.

I aware of the CURLOPT_FORBID_REUSE option if using libcurl, but we're using curl within a shell script.

From what I've read there doesn't appear to be a similar command line option. Am I missing something?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Gmane