Homebrew Cask download failure. SSL certificate problem: certificate has expired I am trying to install NetLogo via Homebrew Cask. I run the following command:

brew cask install netlogo


Homebrew starts the download but immediately throws the following error:

==&gt; Downloading https://ccl.northwestern.edu/netlogo/6.1.1/NetLogo-6.1.1.dmg
#=#=-#  #                                                                     
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Error: Download failed on Cask 'netlogo' with message: Download failed: https://ccl.northwestern.edu/netlogo/6.1.1/NetLogo-6.1.1.dmg


I am understanding that it is happening due to expired certificate on the website hosting NetLogo installer.

Is there a way to work around this issue? For example is there an argument that could be passed to brew command to make it ignore the error? or provide a resolution? or can I manually download the DMG and place it in the Homebrew cache directory so that Homebrew skips downloading when running the install command?
This is documented here, see also https://curl.haxx.se/mail/lib-2020-06/0010.html and https://security.stackexchange.com/questions/232445/https-connection-to-specific-sites-fail-with-curl-on-macos.

The proposed solution is to set HOMEBREW_FORCE_BREWED_CURL

HOMEBREW_FORCE_BREWED_CURL=1 brew cask install netlogo


If you run Catalina you can use

export CURL_SSL_BACKEND=secure-transport


to have curl not use LibreSSL (which seems to have the issue).

You can also remove the entry for AddTrust from /etc/ssl/cert.pem (it's the first entry in the file, just remove all which expired end of May 2020).