Skip to content

Instantly share code, notes, and snippets.

@kkpan11
Forked from zulhfreelancer/change-openssl-version.md
Created November 17, 2023 09:09
Show Gist options
  • Save kkpan11/b821f5647c1ad119188f974ae941f1df to your computer and use it in GitHub Desktop.
Save kkpan11/b821f5647c1ad119188f974ae941f1df to your computer and use it in GitHub Desktop.
How to switch OpenSSL version on Mac using Homebrew?

How to switch OpenSSL version on Mac using Homebrew?

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.

Step 1 - List all OpenSSL versions

$ 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

Step 2a - Switching to version 1.0

$ brew switch openssl 1.0.2t

Step 2b - Switching to version 1.1

$ brew switch [email protected] 1.1.1f

Step 3 - Check new version

$ openssl version
OpenSSL 1.1.1f  31 Mar 2020

Reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment