Closed Rylan12 closed 1 year ago
Just to roughly summarize my guess earlier: my first thought was that ca-certificates
is out of date, and is missing an intermediate cert for the Let's Encrypt CA.
Given that ca-certificates
appears to be up-to-date, my other guess would be a regression in certificate validation for cross-signed certs in whatever SSL library both curl
and wget
use, but that also looks unlikely (since both openssl@1.1
and openssl@3
haven't been updated since November).
My last guess would be some kind of dumb permissions thing -- curl
and wget
need the right permissions to read the CA bundle installed by ca-certificates
, but that should be true by default.
Hmm, I vaguely remember your previous ca-certificates
issue likely being resolved by a reinstall (albeit, after you fixed a temporary shim issue you had introduced while debugging), so that's interesting. Maybe we can tinker with it sometime after the AGM's done.
Works for me (different machines):
❯ /usr/local/opt/curl/bin/curl -vvv https://example.com 2>&1 | rg 'SSL certificate'
* SSL certificate verify ok.
❯ /opt/homebrew/opt/curl/bin/curl -vvv https://example.com 2>&1 | rg 'SSL certificate'
* SSL certificate verify ok.
Try:
rm "$(brew --prefix)"/etc/{openssl@{1.1,3},ca-certificates}/cert.pem
brew reinstall ca-certificates
brew postinstall openssl@{1.1,3}
Huh, I got this:
$ rm "$(brew --prefix)"/etc/{openssl@{1.1,3},ca-certificates}/cert.pem
rm: /opt/homebrew/etc/openssl@1.1/cert.pem: No such file or directory
rm: /opt/homebrew/etc/openssl@3/cert.pem: No such file or directory
Running the following seemed to do the trick though:
$ brew reinstall openssl@{1.1,3}
$ brew reinstall ca-certificates
$ brew reinstall curl
$ /opt/homebrew/opt/curl/bin/curl -vvv https://example.com 2>&1 | rg 'SSL certificate'
* SSL certificate verify ok.
Any idea how that happened or how to stop it from happening again? If not, guess this can be closed. Thanks for your help!
Post-install for OpenSSL probably didn't run for you before.
Huh, well good to know. Hopefully, that solves it for good this time. Thanks for your help!
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Use Homebrew's curl or other formulae that depend on Homebrew's curl like
wget
oryoutube-dl
What happened (include all command output)?
I get this error when using curl:
And similar errors appear when Homebrew curl is used in other things. For example:
I've tried reinstalling
ca-certificates
several times which does not seem to work. There do not appear to be new versions available forca-certificates
orcurl
(checking both withlivecheck
and manually).I also tried setting
HOMEBREW_NO_INSTALL_FROM_API
and reinstallca-certificates
andcurl
with no luck.What did you expect to happen?
No errors and normal
curl
/wget
behavior.Step-by-step reproduction instructions (by running
brew
commands)CC @woodruffw, @EricFromCanada, @SMillerDev, @samford (Sorry if I tagged you but you're not interested, you all are just the the folks I was talking about this to earlier)