NetCore发布在CentOS上,使用https的时候会报错
System.PlatformNotSupportedException: The handler does not support client authentication certificates with this combination of libcurl (7.29.0) and its SSL backend ("NSS/3.34")
网上搜了一下,参考文档的基础上小的调整。基本操作如下:
yum update
yum install openssl-devel gcc
wget https://curl.haxx.se/download/curl-7.61.0.tar.gz
tar -zxf curl-7.61.0.tar.gz
这里注意curl的版本,我用的是当前最新版本。
cd curl-7.61.0
./configure --prefix=/usr/local/curl/ --without-nss --with-ssl=/usr/local/ssl/
make && make install
find / -name 'curl'
/usr/bin/curl
/usr/local/bin/curl
这里是通过find来找到系统2个版本的curl所在目录,一个是7.29,一个是7.61,我这里7.61在/usr/local/bin/curl,所以下面的echo对应的目录是/usr/local/lib
echo '/usr/local/lib' > /etc/ld.so.conf.d/libcurl.conf && ldconfig
最后重启dotnet服务就可以了。