пятница, 22 июня 2018 г.

CentOS 7 libcurl with OpenSSL backend

When your .Net application fails with the following error: 
 
"The handler does not support custom handling of certificates 
with this combination of libcurl (7.29.0) and its SSL backend ("NSS/3.34")"
 
You could use this very bad solution (do it only for dev environment or in docker). 
 
yum update
yum install openssl-devel gcc
wget https://curl.haxx.se/download/<latest>.tar.gz
tar -zxf <latest>.tar.gz
cd <latest>
./configure --prefix=/usr/local/curl/ --without-nss --with-ssl=/usr/local/ssl/
make && make install 
 
echo '/usr/local/curl/lib' > /etc/ld.so.conf.d/libcurl.conf && ldconfig 

Now you can start your .Net application.