Composer installer error on windows: OpenSSL failed with a 'certificate verify failed' error

Viewed 2173

I am setting up lando in my machine.

When I try to install composer, it throwing error as below.

The Composer installer script was not successful [exit code 1].

OpenSSL failed with a 'certificate verify failed' error. This indicates a problem with the Certificate Authority file(s) on your system, which may be out of date.

Certificate location [from SSL_CERT_FILE environment variable]:
C:\projects\cacert.pem

Script Output:
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed

I downloaded the file from https://curl.haxx.se/docs/caextract.html and added file path to my php.ini file.

[curl]
curl.cainfo = "C:\projects\cacert.pem"

[openssl]
openssl.cafile= "C:\projects\cacert.pem"
0 Answers
Related