curl-library
Re: Unable to send email with libcurl (cross compiled for arm) application
Date: Mon, 23 Jul 2012 23:52:31 -0700 (PDT)
Hi Dan,
yes previously ssl support was not enabled and https was not included in the protocols supported, i installed SSL from source and now my configure option is like this:
./configure --host=arm-none-linux-gnueabi --build=i686-linux CFLAGS='-Os' --enable-smtp --with-ssl
after installing curl, when i type curl-config --protocols in the terminal, https is included in the list of supported protocols.
But even after all this the output of sample application is the same,
When i try to open any site with the curl, i got this which is surely related to the certificate:
root@am180x-evm:/home# curl https://www.gmail.com
curl: (60) SSL certificate problem: certificate is not yet valid
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.
Now how can i resolve this ? should i specify the certificate in while configuring ? and from where do i get the certificate of arm ? or will it be the same as of pc ?
Thanks
usama
________________________________
From: Dan Fandrich <dan@coneharvesters.com>
To: curl-library@cool.haxx.se
Sent: Saturday, July 21, 2012 1:09 PM
Subject: Re: Unable to send email with libcurl (cross compiled for arm) application
On Wed, Jul 18, 2012 at 06:38:25AM -0700, usama yaseen wrote:
> I am using libcurl for am-1808 running linux[i need to send emails with my
> c-program], i have compiled the libcurl successfully for arm and the sample
> application gets compiled successfully, but when i run this application on
> arm-board, i got the following output.
>
>
> * About to connect() to smtp.gmail.com port 587 (#0)
> * Trying 74.125.127.108... * 0x12008 is at send pipe head!
> * Connected to smtp.gmail.com (74.125.127.108) port 587 (#0)
> < 220 mx.google.com ESMTP pf8sm6421301pbc.44
> > EHLO am180x-evm
> < 250-mx.google.com at your service, [115.186.161.64]
> < 250-SIZE 35882577
> <
> 250-8BITMIME
> < 250-STARTTLS
> < 250 ENHANCEDSTATUSCODES
> > STARTTLS
> < 220 2.0.0 Ready to start TLS
>
>
> > QUIT
>
> And then it remains stuck there, the output of the same program on my pc is,
What SSL library is this build using? What is the output of "curl
--version"? Can you connect to an https site using that curl binary?
> There is some issue with the certificates, i have tried setting
> ca-bundle while configuring lib-curl, but it didn't helped. Here's my
> command for configuring libcurl.
>
> ./configure --host=arm-none-linux-gnueabi --build=i686-linux CFLAGS='-Os' --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --enable-smtp
There's no --with-ssl on this configure line. Do you even have SSL
support in that binary? If so, curl shouldn't even try an SSL connection
if that's the case, so maybe there's a libcurl bug there.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-24