我试图联系通过PHP的stream_socket_client()命令,这是失败,没有错误代码或信息的url。 这是否使用openssl,curl或其他? 该网站使用https并从网页浏览器正常工作。
当我直接调用openssl时,它连接,但似乎不愉快与我的证书链。
root@drupal7 drupal7/includes# openssl s_client -connect test.cgps.org:443 CONNECTED(00000003) Verify return code: 21 (unable to verify the first certificate)
和curl一样
curl https://test.cgps.org/?q=/admin/config/search/clean-urls/check curl: (60) SSL certificate problem: unable to get local issuer certificate
所以我想我需要将中级证书安装到Linux中,我将Apache使用的相同中间证书放入/ usr / local / share / ca-certificates并运行update-ca-certificates。
root@drupal7 drupal7/includes# update-ca-certificates Updating certificates in /etc/ssl/certs... 1 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d....done.
仍然没有运气…