蔚蓝触点 Azuretouch

Azuretouch
Touch your future

The handler does not support custom handling of certificates with this combination of libcurl (7.29.0) and its SSL backend (\"NSS/3.28.4\")

这两天在写core程序的时候,发生了个奇怪的问题。其实是自己太弱。。。。

本地windows调试一切正常,但是到服务器上就发生了错误。错误代码如下:

The handler does not support custom handling of certificates with this combination of libcurl (7.29.0) and its SSL backend (\"NSS/3.28.4\")

查了一下资料,是libcurl的版本,会影响到带有SSL的HttpWebRequest/HttpClient请求。更新一下即可。

更新curl

wget https://curl.haxx.se/download/curl-7.57.0.tar.gz

# 官方地址:https://curl.haxx.se/download.html

解压编译

# yum install openssl-devel gcc #安装openssl和gcc
tar -zxf curl-7.57.0.tar.gz
cd curl-7.57.0
./configure --prefix=/usr/local/curl/ --without-nss --with-ssl=/usr/local/ssl/
make && make install

替换系统curl

#备份curl
mv /usr/bin/curl /usr/bin/curl.bak
#创建link
ln -s /usr/local/curl/bin/curl /usr/bin/curl

编辑ld.so.conf

vi /etc/ld.so.conf 

include ld.so.conf.d/*.conf
/usr/local/curl/lib

重新load配置

ldconfig

查看版本

curl -V

参考文献:HttpClientHandler.ServerCertificateCustomValidationCallback blows up on OSX

未经允许不得转载:蔚蓝触点 Azuretouch » The handler does not support custom handling of certificates with this combination of libcurl (7.29.0) and its SSL backend (\"NSS/3.28.4\")

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址