cURL / Mailing Lists / curl-users / Single Mail

curl-users

Possible bug w/ alternate SSL locations

From: CJ Ess <zxcvbn4038_at_gmail.com>
Date: Sat, 20 Jun 2015 22:01:49 -0400

I think I've found a bug with using alternate SSL locations with curl.

I built a local copy of OpenSSL:

curl -OL https://www.openssl.org/source/openssl-1.0.2c.tar.gz
tar -xzf openssl-1.0.2c.tar.gz
cd openssl-1.0.2c
./config --prefix=/home/zxcvbn4038/local zlib
make
make test
make install

Then I tried to use it this way:

git clone https://github.com/bagder/curl.git
cd curl
./buildconf
PKG_CONFIG_LIBDIR=/home/zxcvbn4038/local/lib/pkgconfig/ ./configure
--prefix=/home/zxcvbn4038/local

Looking at the configure output it is picking up my alternate openssl
package config from ~/local/lib, however to work right it
requires SSL_LDFLAGS and SSL_CPPFLAGS to be set which is normally not the
case (on Linux at least) and I'm pretty sure they are not, so configure
can't find the symbols it is looking for when linking its tests and thinks
OpenSSL is not installed. I've tried to confirm however configure is some
thick scripting and I can't work out exactly where the tests are being done
(I see the code for that is compiled for the test, but not whats invoking
gcc or where I might need to add linker flags).

I've also tried to use the alternate library this way:

git clone https://github.com/bagder/curl.git
cd curl
./buildconf
./configure --prefix=/home/zxcvbn4038/local --with-ssl=/home/zxcvbn4038
/openssl-1.0.2c

And this time configure finds OpenSSL, enables it, and compiles. However
when linking I get these errors:

../lib/.libs/libcurl.so: undefined reference to `SSL_get0_alpn_selected'
../lib/.libs/libcurl.so: undefined reference to `SSL_CTX_set_alpn_protos'

Both of those symbols are present in my alternate OpenSSL library, however
they are not present in the system OpenSSL library, so again it appears
that we're not setting up the right linker flags in that scenario either.

Both of these seem to be completely reproducible, so I'm hoping that
someone more familiar with configure can duplicate my results and put
together a fix.

-------------------------------------------------------------------
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
Received on 2015-06-21