Scenario: you have both OpenSSL 1.0 and 1.1 installed (using Brew) in your OSX system and you want to switch the current active version without removing other versions that already installed. Here is how to do it.
$ ls -al /usr/local/Cellar/openssl*
/usr/local/Cellar/openssl:
total 0
drwxr-xr-x 13 zulhilmi staff 442 Apr 21 04:31 1.0.2t
/usr/local/Cellar/[email protected]:
total 0
drwxr-xr-x 13 zulhilmi staff 442 Apr 21 04:01 1.1.1f
drwxr-xr-x 13 zulhilmi staff 442 Apr 24 15:41 1.1.1g
$ brew switch openssl 1.0.2t
$ brew switch [email protected] 1.1.1f
$ openssl version
OpenSSL 1.1.1f 31 Mar 2020
Reference:
Error: Unknown command: switch