Error: Calling `brew switch` is disabled! Use `brew link` @-versioned formulae instead.

1. First go to the local installation of homebrew

    cd /usr/local/Homebrew/

2. Homebrew 2.5 remove the option to install formulas directly from git repos so we need to checkout an older version

    git checkout 2.3.0

3. Install openssl latest 1.0.x version

    HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

4. Go back to current version of homebrew

    git checkout -

4. Tell brew to use the old version of openssl this way you can chose wich version to use if you have both intalled

    brew switch openssl 1.0.2t