1

I have installed openssl@1.1 using brew and added the path to my bash-profile. From Terminal I run "which openssl" and it shows the correct location (as in my bash-profile). Also when I run "openssl version" is shows 1.1.0f so that is also correct.

But when I run "composer diagnose" I get the following warning:

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.

I also ran "composer show --platform" and it shows:

lib-openssl 0.9.8.25 OpenSSL 0.9.8y 5 Feb 2013

What do I need to do to get Composer to use the correct version of OpenSSL?

I'm running: OSX 10.12.6, MAMP PHP 7.0.0, Composer 1.5.2, Brew 1.3.5

Any help would be appreciated.

UPDATE:

I tried adding symlinks as mentioned in many of the offered threads:

ln -s /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dyli /usr/local/lib/    
ln -s /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /usr/local/lib/

It didn't work. PHP still shows:

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 0.9.8zh 14 Jan 2016
OpenSSL Header Version => OpenSSL 0.9.8y 5 Feb 2013
Openssl default config => /System/Library/OpenSSL/openssl.cnf

I first tried to symlink from /System/Library/OpenSSL but it wasn't permitted. Maybe I need to sudo it. Before I do that, are there any risks I should be aware of? Am I on the right path? It's very frustrating that some commands in Terminal point to the new openssl, while others don't.

banacan
  • 31
  • 5
  • [How do I install pyOpenSSL on Mac OS X?](http://stackoverflow.com/q/14361569), [Updating openssl in python 2.7](http://stackoverflow.com/q/18752409), [Python referencing old SSL version](http://stackoverflow.com/q/24323858), [Python and OpenSSL version reference issue on OS X](http://stackoverflow.com/q/37690054), [Python 3.3 and Installing PyOpenSSL on a Mac](http://stackoverflow.com/q/21899573), [Using Python with homebrew on OS X](http://stackoverflow.com/q/25441252), etc... – jww Oct 13 '17 at 19:53
  • Also see [Homebrew refusing to link OpenSSL](http://stackoverflow.com/q/38670295), [Update OpenSSL on OS X with Homebrew](http://stackoverflow.com/q/15185661), [How to install latest version of openssl Mac OS X El Capitan](http://stackoverflow.com/q/35129977), [How to upgrade OpenSSL in OS X?](http://apple.stackexchange.com/q/126830), [Openssl installation using HomeBrew fails](http://superuser.com/q/486389), etc. – jww Oct 13 '17 at 19:54
  • How did you install Composer? – robertklep Oct 13 '17 at 20:20

2 Answers2

1

This is exactly the issue I had.

I updated my OpenSSL per these instructions(the only way I found that worked on Mac OS High Sierra

Yet still, Composer showed an error

Then, I followed the instructions in this Video

Problem solved (finally, after 3 days of dead ends)

sea26.2
  • 376
  • 1
  • 5
  • 23
  • 2
    Could you provide a short summary of the video here, to help if the creator of the video deletes or changes the contents? – Jacob Colvin Jun 01 '18 at 20:37
0

Check PHP version your Mac OS shipping. It should like PHP 5.6.

Try to upgrade your version of PHP to 7.0 or above. And run command again check version on your current folder.

php -v

php -i | grep OpenSSL

If the output of php -v still doesn’t echoes the version 7, type following command to update your path.

export PATH=/usr/local/php5/bin:$PATH
Dong Zen
  • 41
  • 1