System.PlatformNotSupportedException: The handler does not support client authentication certific...

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服务就可以了。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容