raggi / openssl-osx-ca

Simple periodic task to sync OSX Keychain certs to Homebrew installed OpenSSL & LibreSSL
Other
224 stars 24 forks source link

Issue with Catalina / PHP #21

Closed ezzatron closed 4 years ago

ezzatron commented 4 years ago

I think I've encountered a bug of some sort. On a fresh install of my workstation I'm getting this SSL error after installing openssl-osx-ca:

$ php -r 'echo file_get_contents("https://repo.packagist.org/packages.json");'
PHP Warning:  file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1
PHP Warning:  file_get_contents(): Failed to enable crypto in Command line code on line 1

Warning: file_get_contents(): Failed to enable crypto in Command line code on line 1
PHP Warning:  file_get_contents(https://repo.packagist.org/packages.json): failed to open stream: operation failed in Command line code on line 1

Warning: file_get_contents(https://repo.packagist.org/packages.json): failed to open stream: operation failed in Command line code on line 1

If I do the following:

$ brew services stop openssl-osx-ca
$ brew reinstall --force openssl

Then suddenly the issue dissapears:

$ php -r 'echo file_get_contents("https://repo.packagist.org/packages.json");'
{"packages":[],"notify":"https://packagist.org/downloads/%package%","notify-batch":"https://packagist.org/downloads/","providers-url":"/p/%package%$%hash%.json","metadata-url":"/p2/%package%.json","search":"https://packagist.org/search.json?q=%query%&type=%type%","provider-includes":{"p/provider-2013$%hash%.json":{"sha256":"c3af737c3e33db3b07aaa16de2115486b89fc157b2cfd16d7c1f6fb5bfa665c8"},"p/provider-2014$%hash%.json":{"sha256":"a3e7e0ca00904e1f184e7d320d164ee5e613e2ea1c4c000baf46be64254cc1bb"},"p/provider-2015$%hash%.json":{"sha256":"44394efe35097a2653d94210db54f268d0d5ccce6df7b15d848646a80dcdc3d6"},"p/provider-2016$%hash%.json":{"sha256":"521f4c36c2c476b5b42581a563e3b05137921b77af2af16fdc6909e75e4196c3"},"p/provider-2017$%hash%.json":{"sha256":"ff7d8654674abde91720363b6e9d692a0b32cd1dae085b8c4f483e4ffd936f62"},"p/provider-2018$%hash%.json":{"sha256":"4ceb2f0fd7648bce97861b68c8643a0be776f7491d9c6e1cafda263b64e88672"},"p/provider-2019$%hash%.json":{"sha256":"32e34761e653e68839aa3e4598f63787c18920e56c0698d1af08c8f59f344b17"},"p/provider-2019-04$%hash%.json":{"sha256":"3961b89dc43ef026d095c2392ab9e67e09d1ce27bd79a7f4ebfa63632cc664b2"},"p/provider-2019-07$%hash%.json":{"sha256":"27c4eb86af4a443113b1bd3184b54db38c5486fb376d49d104850880fd45ddd3"},"p/provider-2019-10$%hash%.json":{"sha256":"dfd5483fdc517b94065b6d78686e4e9c1a9fcdd135f346cf74cfdced08465c23"},"p/provider-archived$%hash%.json":{"sha256":"9532211868a5d20fe38633e55862be5a33d20e1e2ddddb4513dfba423e726ba2"},"p/provider-latest$%hash%.json":{"sha256":"51cb7a03acf698bf7c008c9e2cea0aeadbc53b64193eef83368fe06122b1ab04"}}}

But as soon as I re-enable openssl-osx-ca, the issue re-emerges.

On top of that, brew services list shows the openssl-osx-ca service as started, but with a yellow color. Apparently this actually means that the status is unknown, but I couldn't find any logs to investigate further.

Any ideas how I might resolve this issue?

raggi commented 4 years ago

Fixed in 5.0.1 - thanks for the report!

ezzatron commented 4 years ago

Thanks for the fix! Verified that it's working for me too.