I'm trying to use composer to install packages but I get this message :
The "https://packages.drupal.org/8/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Failed to enable crypto
failed to open stream: operation failed
I upgraded my homebrew openssl to the last version but composer seems to use an old installation in MAMP library:
$ which openssl
/Applications/MAMP/Library/bin/openssl
$ openssl version -d
OPENSSLDIR: "/Applications/MAMP/Library/OpenSSL"
$ whereis openssl
/usr/bin/openssl
$ openssl version
OpenSSL 1.0.2j 26 Sep 2016
anyway I get this when I try to reinstall composer:
$ curl -sS https://getcomposer.org/installer | php
Downloading...
Composer (version 1.5.2) successfully installed to: /Volumes/YOM_2/htdocs/composer.phar
Use it: php composer.phar
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:
The OpenSSL library (0.9.8y) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.
How can I make it use the last version? I'm lost... Thank you.