我最近将本地OS X Zend Server安装更新为PHP 5.6,并且在运行composer self-update时收到以下错误消息:[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
到处搜寻,我终于得出结论,PHP 5.6中对SSL进行了各种改进,问题是它在我的系统上找不到任何OpenSSL证书。这并不完全令人惊讶,因为OS X不再使用内部使用OpenSSL而是使用其自己的库。php -r "print_r(openssl_get_cert_locations());"
输出信息:Array
(
[default_cert_file] => /usr/local/openssl-0.9.8zb/ssl/cert.pem
[default_cert_file_env] => SSL_CERT_FILE
[default_cert_dir] => /usr/local/openssl-0.9.8zb/ssl/certs
[default_cert_dir_env] => SSL_CERT_DIR
[default_private_di