brew: MacOS system curl broken after letsencrypt CA cert expiry
brew config output
HOMEBREW_VERSION: 3.2.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: 4e6919b73444e9f9e02ad81d8afc4bbd97533567
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c437fbe02752c09d3bad41eb2ab84832ea15968f
Core tap last commit: 20 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: quad-core 64-bit kabylake
Clang: 11.0.0 build 1100
Git: 2.33.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: 11.3.1
brew doctor output
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/more/.
You should download the Command Line Tools for Xcode 11.3.1.
Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting your PATH for example like so:
echo 'export PATH="/usr/local/sbin:$PATH"' >> /Users/me/.bash_profile
- I ran
brew updateand am still able to reproduce my issue. - I have resolved all warnings from
brew doctorand that did not fix my problem.
What were you trying to do (and why)?
I was trying to reinstall openconnect from HEAD using brew reinstall openconnect.
I had originally installed openconnect using brew install openconnect --HEAD.
What happened (include all command output)?
$ brew reinstall openconnect
==> Downloading https://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/c0122e891f7e033f35f047dad963702199d5cb9e:/vpnc-script
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
Error: Failed to download resource "openconnect--vpnc-script"
Download failed: https://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/c0122e891f7e033f35f047dad963702199d5cb9e:/vpnc-script
What did you expect to happen?
openconnect should be installed from latest HEAD.
Step-by-step reproduction instructions (by running brew commands)
brew reinstall openconnect
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (15 by maintainers)
Commits related to this issue
- lib/test_bot: set `HOMEBREW_FORCE_BREWED_CURL` on Mojave Mojave Curl currently doesn't work (cf. Homebrew/brew#12161). Until we have a fix in `brew`, let's set this in `test-bot` so that we can get C... — committed to carlocab/homebrew-test-bot by carlocab 3 years ago
- lib/test_bot: set `HOMEBREW_FORCE_BREWED_CURL` on Mojave Mojave Curl currently doesn't work (cf. Homebrew/brew#12161). Until we have a fix in `brew`, let's set this in `test-bot` so that we can get C... — committed to carlocab/homebrew-test-bot by carlocab 3 years ago
We’ve released 3.2.15 with a full fix for this.
Short summary: You don’t need to set any envs or do any workarounds anymore (though you can keep them if you want) - it should all work automatically now.
Long changelog:
ca-certificateshas been added to homebrew-core (https://github.com/Homebrew/homebrew-core/pull/86304)HOMEBREW_FORCE_BREWED_CA_CERTIFICATES=1.openssl@1.1, our CA store used by default (other TLS libraries coming soon), but it can also be used externally should whatever you are using allow swapping CA certificate stores.HOMEBREW_FORCE_BREWED_CA_CERTIFICATES=1should be enough)cmake(needed if you are building from source) no longer installs documentation - this is now in a separatecmake-docsformula (https://github.com/Homebrew/homebrew-core/pull/86249).c-aresnow has only one build-time dependency (https://github.com/Homebrew/homebrew-core/pull/86250/)nghttp2have been split into a separatelibnghttp2formula (https://github.com/Homebrew/homebrew-core/pull/86291).GIT_SSL_CAINFO), which is installed by default on affected macOS systems.There’s more but I think that covers most of noticeable things.
This answer at Stack Overflow shows which entry to delete from
/etc/ssl/cert.pemto get things working on your machine.Thanks for the report – we’ve encountered this problem in CI in quite a few PRs already.
In the meantime, as a workaround, you can set
HOMEBREW_FORCE_BREWED_CURL=1.Yes it’s exactly that. In terms of LibreSSL (what Apple use for curl), it was an bug up to LibreSSL 3.2.0. But Apple did backport a fix to 2.8.3 in macOS 10.15.6.
So the bug affects 10.13-10.15.5 (curl uses SecureTransport before 10.13). 10.10 and 10.11 are also affected because they don’t contain the ISRG Root X1 certificate in their default cert store at all. 10.12 weirdly enough should work fine as far as I know.
I can confirm the above. Where I work we have Mac buildbots for each major macOS version. None have brew. This table shows where I’ve had issues with
svnand/orgitfailing, and the version of openssl and curl on each.10.10 and 10.11 I fixed by just adding the ‘ISRG Root X1’ certificate in Keychain.app, per this:
https://community.letsencrypt.org/t/connection-errors-on-apple-devices/161107/25?u=seanm
But 10.13 and 10.14 still have issues, and indeed I suspect curl is the issue.
I thought updating my svn and git binaries would help, and for that I’ve turned to brew, but it uses curl too, so I’m still stuck. 😃
As far as I know you should just be able to install the bottles Homebrew provides as well, it should only be building from source that’s broken.
I believe this is due to the expiry of a LetsEncrypt CA certificate.
https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
If I try to download the openconnect file using system curl, it fails.
If I use brew-installed curl, then it succeeds.
Homebrew should be forcing the use of homebrew-installed curl for
brew installon systems that don’t have a system curl compatible with the new LetsEncrypt root CA certificates.