Composer & # 8594; error: 14090086: SSL procedures: SSL3_GET_SERVER_CERTIFICATE: certificate verification failed

I can connect to the SSL sites installed by the composer via the command line via HTTPS. Check out the OPENSSL version SSL Version => OpenSSL/1.0.1j. So where is the problem? Thoughts?

Here is the original conclusion.

[kunaaljain@localhost php]$ /opt/lampp/bin/php-5.6.3 composer.phar diagChecking composer.json: FAIL
the property name is required
the property description is required
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" 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 open stream: Cannot connect to HTTPS server through proxy
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" 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 open stream: Cannot connect to HTTPS server through proxy
+4
source share
2 answers

This is an OpenSSL problem with php> 5.6. Rob Allen has a fix using the homegrown here: http://akrabat.com/ssl-certificate-verification-on-php-5-6/

github Composer: https://github.com/composer/composer/issues/2798#issuecomment-68200214

php.ini, , :

curl.cainfo=/full/path/to/ssl/certs/ca-bundle.crt
openssl.cafile=/full/path/to/ssl/certs/ca-bundle.crt

, :

+2

Mac OSX El Capitan .

, , , openssl, . Apple Keychain, bash script:

    cert_file="$( openssl version -d | awk -F'"' '{print $2}' )/cert.pem"
    mkdir -p "${cert_file%/*}"
    security find-certificate -a -p /Library/Keychains/System.keychain > "$cert_file"
    security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$cert_file"

, openssl . .

+1

All Articles