cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl-users Digest, Vol 128, Issue 8

From: John Didion <johndidion_at_gmail.com>
Date: Mon, 18 Apr 2016 08:34:00 -0400

Thanks Dan, very helpful! I re-did everything from scratch using a local directory for the install:

# OpenSSL (the script is indeed called ‘config’, at least in 1.1
./config --prefix=/home/didionjp/.local --openssldir=/home/didionjp/.local no-shared ; make ; make test ; make install
# Curl
PKG_CONFIG_PATH=/home/didionjp/.local/lib/pkgconfig ./configure --with-ssl --prefix /home/didionjp/.local --disable-shared --enable-static ; make ; make install

Because I only built static versions of the programs (or at least that’s what I assume I’m doing with no-shared/—disable-shared —enable-static), I would assume that ldd show any point to any libssl/libcrypto, which is indeed true:

=> ldd ~/.local/bin/curl
        linux-vdso.so.1 (0x00007ffcea5fd000)
        libpthread.so.0 => /home/didionjp/.linuxbrew/lib/libpthread.so.0 (0x00007fc97ecef000)
        libdl.so.2 => /home/didionjp/.linuxbrew/lib/libdl.so.2 (0x00007fc97eaec000)
        libz.so.1 => /home/didionjp/.linuxbrew/lib/libz.so.1 (0x00007fc97e8d8000)
        libc.so.6 => /home/didionjp/.linuxbrew/lib/libc.so.6 (0x00007fc97e55c000)
        /home/didionjp/.linuxbrew/lib/ld.so (0x00007fc97ef0b000)

The verbose output revealed that there was a ‘Location’ header, so I found out about —location and now it works! Thanks for the advice.

John

> Date: Mon, 18 Apr 2016 07:42:52 +0200
> From: Dan Fandrich <dan_at_coneharvesters.com>
> To: curl-users_at_cool.haxx.se
> Subject: Re: curl failing silently with some https URLs
> Message-ID: <20160418054252.GA30625_at_coneharvesters.com>
> Content-Type: text/plain; charset=iso-8859-7
>
> On Sun, Apr 17, 2016 at 10:46:32PM -0400, John Didion wrote:
>> I built openssl 1.1 from source:
>>
>> config no-shared ; make ; make test ; make install
>
> This config command doesn't specify a path; are you sure it ran the one you
> wanted? And isn't OpenSSL's configure command called "Configure" not "config"
> (I haven't built it myself in a while)?
>
>> Then built curl 7.48 from source:
>>
>> configure --with-ssl --disable-shared --enable-static
>
> Same here; hopefully, you didn't have any other "configure" command in your
> PATH. Also, you didn't specify which OpenSSL you wanted curl to use. It would
> most likely have picked up any system OpenSSL instead of the one you built.
> Read docs/INSTALL and set PKG_CONFIG_PATH to point to the location of the
> OpenSSL pkgconfig file you just built.
>
>> Then tried to fetch a file from an https url:
>>
>> curl https://linuxbrew.bintray.com/bottles/sqlite-3.11.0_1.x86_64_linux.bottle.tar.gz
>
> Once again, this is going to use the first curl in your PATH, not necessarily
> the one you want to use.
>
>> This fails silently - the file doesn’t download, there is no error message, there is no output at all. It doesn’t appear to be a certificate issue, as it still fails in insecure mode (i.e. using -k).
>> I can download the file just fine using wget. I can also successfully fetch other https sites using curl, such as:
>>
>> curl https://www.google.com
>
> Did you check the return code? That behaviour would be normal in the case of a
> zero-length file, but since you say you're able to download it with another
> client, there's something else going on. Try the -v option to see more verbose
> logs of what's going on. Also, use the --version flag to make sure your curl
> built with the OpenSSL you think it should be using, and "ldd path/to/curl" to
> make sure it's using the right libraries at run-time that you want it to.
> And once you get it working, you're unlikely to want to print the binary to
> stdout, which is what that command will do; use -O to write it into a file
> instead.
>
>>>> Dan
>
>
> ------------------------------
>
> 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 128, Issue 8
> ******************************************

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-04-18