How to fix curl: (35) SSL certificate problem: Couldn't understand the server certificate format?

Solution 1:

Open chromedriver_mac64.zip in your browser. If you see this message:

<Error>
  <Code>AccessDenied</Code>
  <Message>Access denied.</Message>
  <Details>
    We're sorry, but this service is not available in your location
  </Details>
</Error>

Then Google is restricting your access. Simply download that file with an alternative network/IP/location. Then move the file to ~/Library/Caches/Homebrew/ or /Library/Caches/Homebrew/ due to the installation of Homebrew. Then try to reinstall. Homebrew will use downloaded file.

Alternatively you can use a network proxy in the terminal while running brew command.

Solution 2:

Your curl is using SecureTransport which is using macOS builtin version of SSL which likely be incapable of outgoing encrypted web communications, instead of OpenSSL.

So try reinstalling curl via Homebrew with the following options to support OpenSSL:

brew reinstall curl --with-libssh2 --with-openssl

Note: Paste above line into the Terminal.

Related: cURL fails with error: Couldn't understand the server certificate format.