25

openssl 0.9.8 doesn't work with tls 1.2:

user@computer: /usr/bin/openssl version
OpenSSL 0.9.8zg 14 July 2015
user@computer: /usr/bin/openssl s_client -connect somesite.com:8443
CONNECTED(00000003)
write:errno=54

But openssl 1.0.2 are working with it:

user@computer: openssl version         
OpenSSL 1.0.2d 9 Jul 2015
user@computer: openssl s_client -connect somesite.com:8443
CONNECTED(00000003)
depth=2 C = US, O = "blah-blah" ...
....

I'm using MAMP as a local server. phpinfo: phpinfo

How change openssl version in MAMP? I know, that this question is duplicate, but I really need help.

5
  • I don't use mac, mamp and all those things but consider to stop using mamp if you need openssl 1.0 and they still deliver 0.9 even for current PHP version. For example PHP 5.5+ for Windows is delivered with openssl 1.0. I believe you can install PHP from another source or install development enviroment to virtual machine. As a PHP developer you should be able to install basic dev enviroment from the scratch.
    – kba
    Nov 25, 2015 at 8:14
  • have you found a solution for that? if yes, could you please share it with me? I need to work with tls 1.2 too (because of ios 9)... Dec 29, 2015 at 21:09
  • @LoryLory, no, i haven't.
    – MichaelPak
    Dec 30, 2015 at 13:37
  • 1
    ok...excuse me. What I can advise to you, if you don't already know it, is to use the latest version of AMPPS which has apache 2.4 and an upgraded version of openssl... see my post here: apple.stackexchange.com/questions/206901/… Dec 30, 2015 at 13:39
  • @LoryLory, oh! thank you!
    – MichaelPak
    Dec 30, 2015 at 13:40

4 Answers 4

13
+100

I have asked this question to developers MAMP & MAMP PRO. Here's what they said:

MAMP (PRO) 3.x does NOT bundle OpenSSL software but uses what comes bundled with Mac OS. If you update OpenSSL in Mac OS, MAMP (PRO) should automatically use the updated version. We will be including the latest OpenSSL in our future MAMP 4 release, which will be available soon. This will be a paid update.


UPD From comments (thanks to @lukemh):

PHP CURL fails on Cloudflare or SSLv3 sites using MAMP 3.5 due to old OpenSSL version

8
  • 6
    these would be good news but I am afraid they're making fun of us because I updated OpenSLL on my MacBook Pro with El Capitan and following this answer (stackoverflow.com/questions/34518502/…) I updated also the links to new openssl binary file... (/usr/bin/openssl) but it did not work...both mamp and apache still use 0.9.8... :( Dec 30, 2015 at 13:56
  • would you tell me their email? I'd like to write them too Dec 30, 2015 at 14:00
  • @LoryLory, [email protected]
    – MichaelPak
    Dec 30, 2015 at 14:01
  • 5
    Just an warning about MAMP 4.0. I just instaled the pre-release 4 and it completely ereased all my websites under htdocs folder. Everything is gone. Thank goodness I made a backup. Be careful.
    – VVV
    Aug 12, 2016 at 17:13
  • 3
    @vyx.ca no: they usually rename the old MAMP, they never delete.
    – user429620
    Mar 13, 2017 at 13:32
5

I recompiled libcurl MAMP is using. It works for me now :)

So, let's do the following:

  1. Run /Applications/MAMP/Library/bin/curl-config --version to see which version you've got
  2. Go to http://curl.haxx.se/download/ and download the right version
  3. Configure it with ./configure --prefix=/Applications/MAMP/Library/
  4. make && make install

Source: http://dev.soup.io/post/56438473/If-youre-using-MAMP-and-doing-something

5
  • @FranciscoBueno - this worked great at first but now I'm getting Protocol "https" not supported or disabled in libcurl. Apparently it should be configured with --with-ssl as well, but then it can't find the openssl files and configure fails. May 2, 2016 at 16:14
  • Hi Fran, I needed to add --with-ssl=/usr/local/Cellar/openssl/1.0.2c to configure to use the homebrew installed version of openssl, otherwise it still uses the version provided by macos. May 26, 2016 at 0:55
  • -bash: ./configure: No such file or directory
    – OZZIE
    Jun 28, 2016 at 16:07
  • Okay, now I have "curl 7.49.1 (x86_64-apple-darwin15.5.0) libcurl/7.49.1 OpenSSL/1.0.2h zlib/1.2.5 librtmp/2.3" but still no TLS 1.2 in PHP - does file_get_contents e.g. uses libcurl internally? Jul 5, 2016 at 14:44
  • This worked for me. Here was an easy to follow guide: grasmash.com/article/using-httpsssl-mamps-curl-osx For MAMP you can drop that php.ini line into the php.ini for the PHP version you are running, i.e. Applications/MAMP/bin/php/php7.0.0/conf/php.ini
    – John F
    Nov 18, 2016 at 17:47
4

As of July 21, 2016, there is a pre-release available of MAMP PRO 4 which includes OpenSSL 1.0.2, get the pre-release here:

https://www.mamp.info/en/pre-release.html

0

If you wish to continue using MAMP version 3 you could also do the following to get it to work:

  1. Rename your current version of MAMP to MAMPv3
  2. Download MAMP version 4 and once downloaded rename it to MAMPv4
  3. Rename MAMPv3 back to just plain old MAMP
  4. Go back into MAMPv4 and head into the "Library" directory and copy the folder inside called "OpenSSL"
  5. Move this folder into your older version of MAMP and reboot servers. Worked for me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.