Skip to content

Instantly share code, notes, and snippets.

@clementbiron
Created October 24, 2018 09:30
Show Gist options
  • Save clementbiron/757d58097c821a6ba9b328b95f322c44 to your computer and use it in GitHub Desktop.
Save clementbiron/757d58097c821a6ba9b328b95f322c44 to your computer and use it in GitHub Desktop.
Composer open ssl error

When using composer install or composer update i this error :

The "https://wpackagist.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 enable crypto
  failed to open stream: operation failed

After many hours, i found this solution (on Windows 10, WAMP 3.1.4, Apache 2.4.27, PHP 7.1.9)

  • Download http://curl.haxx.se/ca/cacert.pem and copy it to c:/cacert.pem
  • Find your php.ini path with php --ini and open it
  • Replace ;openssl.cafile= by openssl.cafile=c:\cacert.pem

Should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment