1、查看源版本
[root@zj ~]# openssl version -a
[root@DS1-VM-Node250 ~]# mkdir /tmp/openssl
[root@DS1-VM-Node250 ~]# curl -Lk https://www.openssl.org/source/openssl-1.0.2h.tar.gz|gunzip |tar x -C /tmp/openssl --strip-components=1
[root@DS1-VM-Node250 ~]# cd /tmp/openssl/
[root@DS1-VM-Node250 /tmp/openssl]# ./config --prefix=/usr shared zlib
[root@DS1-VM-Node250 /tmp/openssl]# make -j $(awk '/processor/{i++}END{print i}' /proc/cpuinfo) && make install && cd
[root@DS1-VM-Node250 ~]# rm -rf /tmp/openssl/
[root@DS1-VM-Node250 ~]# openssl version
OpenSSL 1.0.2h 3 May 2016
还要重新编译NG 的版本,最好用最新稳定版本的。
还有如果是PHP CURL 的问题 一般老的系统比如centos 5 redhat5 不支持SNI 技术的
curl: (51) SSL: no alternative certificate subject name matches target host name 'ai.120.net'
SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed'
程序也可以解决,但是不是长久的问题
//设置对ssl不进行证书校验curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
需要在升级完openssl 的时候
在升级CURL
./configure --prefix=/usr/local/libcurl --enable-http --enable-ftp --enable-file --enable-ldap --enable-ldaps --enable-dict --enable-proxy --with-ssl
重新编译PHP
--with-curl=/usr/local/libcurl