将centos6的curl ssl版本(NSS)替换成openssl,解决Unable to load client key -8178的错误问题

在centos 6.2的系统里面的curl支持的https是nss版本的,而不是openssl的,所以在php使用curl访问https的时候会报Unable to load client key -8178的错误,在google group里面找到了灵感,也是curl和https的,里面说倒是curl的问题:
https://groups.google.com/forum/?fromgroups=#!topic/pongba/sgMYM9dGI7k


根据链接里面说的,去官网下载了一个最新版本(curl-7.28.1.tar.gz)的curl,来进行源码编译。
编译的依赖,openssl和openssl-devel。
编译方法和其他软件类似,步骤如下:
去到源码目录:curl-7.28.1
./configure --without-nss --with-ssl && make &&make install 即可完成编译。


然后是把curl的lib添加到PATH中,这个也是在google group里面说到的。
echo "/usr/local/lib" >> /etc/ld.so.conf && ldconfig


此时,通过命令行运行php调用curl 带证书访问web的php程序可以正常了。但是通过web界面还是之前那个Unable to load client key -8178 问题,需要重新编译php。
 

时间:2012-12-21 | 分类:技术文摘 | 标签: PHP  linux  Centos  openssl 
评论列表
暂无评论
发表评论
昵称
邮箱
内容