报错信息

SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

解决方法

应该是CA证书验证失败造成的错误,下载个CA证书

wget http://curl.haxx.se/ca/cacert.pem
mv cacert.pem /usr/local/openssl/ssl/certs/cacert.pem
vim /usr/local/webserver/php/etc/php.ini

修改cafile路径,保存

[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
;openssl.cafile=
openssl.cafile=/usr/local/openssl/ssl/certs/cacert.pem

相关评论(0)
您是不是忘了说点什么?

友情提示:垃圾评论一律封号...

还没有评论,快来抢沙发吧!