Recently I've been annoyed by the strange cURL SSL errors that have been producing on my macOS. I've read that reinstalling cURL with option --with-openssl solves the issue, but it turns out to be error: invalid option: --with-openssl.

I'll go straight to the point: homebrew team removed all install options for curl recently, and people should use curl-openssl instead.

So run the following to switch:

$ brew upgrade
$ brew uninstall curl
$ brew install curl-openssl
$ echo 'export PATH="/usr/local/opt/curl-openssl/bin:$PATH"' >> ~/.zshrc