If you're using Homebrew /usr/local/bin should already be at the front of $PATH or at least come before /usr/bin. If you now run brew link --force openssl in your terminal window, open a new one and run which openssl in it. It should now show openssl under /usr/local/bin.

Answer from Olaf Heinemann on Stack Overflow
🌐
Medium
maxim-ivanitskiy.medium.com › upgrade-openssl-for-macos-e7a9ed82a76b
Upgrade OpenSSL for MacOS. I needed to generate a self-signed… | by Maxim | Medium
February 5, 2020 - brew update brew upgrade brew install openssl mkdir -p /usr/local/lib ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ brew link - force openssl · The last command likely to complain about not able to replace macOS built-in OpenSSL:
Discussions

security - How to upgrade OpenSSL in OS X? - Ask Different
Today the heartbleed OpenSSL exploit ... and steal passwords). This affects OpenSSL versions including 1.0.1f which is the version on my · up-to-date Mavericks computer Mac (because I used port/brew to install other software which updated my openssl without me realizing ... More on apple.stackexchange.com
🌐 apple.stackexchange.com
April 8, 2014
Updating OpenSSL to 1.1.1 on MacOS - Stack Overflow
The new LTS 1.1.1 version of OpenSSL is out. How can I upgrade to it using homebrew on MacOS? More on stackoverflow.com
🌐 stackoverflow.com
python - How to update OpenSSL on mac? - Stack Overflow
I need to ensure that I have OpenSSL version of 1.0.1 or greater to connect to the Salesforce API according to this documentation. According to this question, I can do the following steps (which ... More on stackoverflow.com
🌐 stackoverflow.com
macos - How to install latest version of openssl Mac OS X El Capitan - Stack Overflow
OpenSSL 0.9.8zg 14 July 2015 built ... OPENSSLDIR: "/System/Library/OpenSSL" How can I replace the old version with the new one? I've searched a lot on how to do this, but the solutions online don't seem to work for me... ... brew update brew install openssl echo 'export ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
David Wampamba
blog.davidofug.com › how-to-update-openssl-on-macos
How to update Openssl on MacOS
December 19, 2024 - Optionally, you might have to run an extra command in order to remove remnants or uninstall the unwanted OpenSSL version completely. ... $ echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> ~/.zshrc # Or if using bash: # $echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> ~/.bashrc # Update compiler flags for building software that uses OpenSSL $ export LDFLAGS="-L/usr/local/opt/openssl@3/lib" $ export CPPFLAGS="-I/usr/local/opt/openssl@3/include" $ export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
🌐
GitHub
gist.github.com › a9f353a7a4a966cabc820138e12a7e33
Upgrade openssl on Mac · GitHub
Save phuang07/a9f353a7a4a966cabc820138e12a7e33 to your computer and use it in GitHub Desktop. Download ZIP · Upgrade openssl on Mac · Raw · gistfile1.sh · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below.
🌐
Macupdate
openssl.macupdate.com › security › encryption & decryption
Download OpenSSL for Mac | MacUpdate
To install the OpenSSL toolkit and library on your Mac, you must open the Terminal application, go to the OpenSSL source folder, and follow the instructions from the INSTALL file included in the archive.
Find elsewhere
🌐
LEMP
lemp.io › how-to-update-openssl-on-mac-os-10-12
How To Update Openssl On Mac Os 10.12? – LEMP
August 24, 2022 - By running sudo apt-get update > and then sudo apt-get install –only-upgrade openssl, you can update Stripe, and restart it with the associated openssl data.Update libssl, too.It is possible to install this update using Run to update the version & Run apt-get install –only-upgrade libssl-dev.
🌐
YouTube
youtube.com › watch
How to Update OpenSSL on Mac - YouTube
Learn how to update OpenSSL on your Mac to ensure security and compatibility with the latest encryption standards. This guide provides step-by-step instructi...
Published   May 20, 2024
Views   265
🌐
Medium
katopz.medium.com › how-to-upgrade-openssl-8d005554401
How to upgrade OpenSSL (macOS). Problem : OpenSSL Security Advisory… | by katopz | Medium
January 20, 2017 - How to upgrade OpenSSL (macOS) Problem : OpenSSL Security Advisory [3rd May 2016] High severity Solution : Update it :) Mac OSX 10.11.4 Check version $ openssl version -a Backup old version $ sudo mv …
Top answer
1 of 2
7

I think this is a multi-part issue with the versions of Python you are using and your $PATH variable.

First check where you're looking for Python by using this command in the terminal:

which python

It should output something like this: /usr/local/bin/python

Then check for the path that you have setup.

echo $PATH

Likely you're seeing something like:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/username/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin

The issue is probably that the version of python tied to your default when you enter python in your terminal is not one that has the modern version of openssl.

In other words:

openssl version -a

Is checking for openssl somewhere different than

python -c "import ssl; print ssl.OPENSSL_VERSION"

To fix this, you might try editing your $PATH variable.

I suggest doing this by editing something like your ~/.bash_profile file. You can add something like this to specify a different Python binary to use:

export PATH="/usr/local/bin:$PATH"

Plop this on the end of your .bash_profile file and then whenever you're using bash it should look for Python in the /usr/local/bin directory before looking elsewhere. Keep in mind that this might also affect places that other programs look for Python (or other binaries).

2 of 2
1

@fernando's answer had the right theory but his recommendation for a next step didn't work for me, because /usr/local/bin was already first in my $PATH. Here's how I fixed mine:

In the response for brew info python I saw:

==> Caveats This formula installs a python2 executable to /usr/local/bin. If you wish to have this formula's python executable in your PATH then add the following to ~/.bash_profile: export PATH="/usr/local/opt/python/libexec/bin:$PATH"

I added that last line to my ~/.bash_profile, opened a new terminal window, and it worked.

🌐
Chron.com
smallbusiness.chron.com › update-openssl-apple-51834.html
How to Update OpenSSL on an Apple
November 22, 2017 - Click on the Apple icon on your Mac screen. Click "Software Update..." from the drop-down menu to launch the "Checking for New Software" dialog box. Update either OpenSSL or your entire your computer, if required.
🌐
SSL Dragon
ssldragon.com › home › tutorials › openssl tutorials › how to check the openssl version on linux, windows, and mac?
How to Check the OpenSSL Version on Linux, Windows, and Mac? - SSL Dragon
2 weeks ago - Open the terminal: press Ctrl + Alt + T, or search for “Terminal” in your applications menu. ... The output shows the installed version, for example OpenSSL 3.5.6 4 Nov 2025. Open Command Prompt: press Win + R, type cmd, and press Enter.
Top answer
1 of 3
3

IMO the best way to install openssl on MacOS is to use Homebrew. This will not only install openssl, but will also allow it to be upgraded in the future.

brew install openssl

If you want to make the Homebrew version the default (rather than the LibreSSL that comes with MacOS), you will also need put the Hombrew-installed openssl on your path ahead of the MacOS version. While it is possible to accomplish this by putting /opt/homebrew/bin on your PATH ahead of /usr/bin, I strongly discourage this, because it makes you vulnerable to unintentionally installing a malicious Homebrew package named something like ls that overrides your default ls with malicious code. Instead, my personal preference is to have a user-level directory where I maintain a small set of binaries that override the defaults.

# Create a user-level bin directory, if it doesn't already exist.
mkdir -p ~/bin

# Create a symlink to the Homebrew openssl, if such a symlink does not already exist
ln -fs /opt/homebrew/bin/openssl ~/bin/openssl

Then, put ~/bin on your PATH, ahead of /usr/bin. This part depends on which shell you are using. For bash, you can add this to your ~/.bash_profile.

# User-level binaries, manually added
PATH="${HOME}/bin:${PATH}"
2 of 3
2

The first option is the simplest one: do nothing. macOS has shipped with OpenSSL preinstalled since 2000.

You can download a binary distribution of OpenSSL. The OpenSSL project does not itself publish binary releases, but they maintain a list of third-party resources that publish OpenSSL binaries.

You can install it using MacPorts.

You can install it using Homebrew.

You can compile it yourself. You already downloaded the source code, so all you need is to follow the instructions in the INSTALL.md file you are showing in your screenshot. I assume that, since you chose to use an inofficial development version, you may run into some bugs.

🌐
Apple Community
discussions.apple.com › thread › 4041891
Updating OpenSSL on Mac System version 10… - Apple Community
June 22, 2012 - Then I have to assume that the actual version of OpenSSL 1.0.0e 6 Sep 2011 must be ok! ... Adding to the reason of this question was that I had to install webmin on Lion. The installation went well and SSL is working just fine. I also update Bind to 9.0.1 without any problems.
🌐
Stack Overflow
stackoverflow.com › questions › 52553237 › how-update-openssl-on-mac-osx
macos - How update OpenSSL on Mac OSX - Stack Overflow
September 29, 2018 - SSL Version => OpenSSL/0.9.8zd OpenSSL support => enabled OpenSSL Library Version => OpenSSL 0.9.8zh 14 Jan 2016 OpenSSL Header Version => OpenSSL 0.9.8y 5 Feb 2013 Openssl default config => /System/Library/OpenSSL/openssl.cnf Native OpenSSL support => enabled · I need to upgrade OpenSSL to version 1.0.1 or above.
🌐
MacPorts
ports.macports.org › port › openssl
Install openssl on macOS with MacPorts
Shim port installing symbolic links in primary prefix pointing to the openssl3 installation. ... If not done already, install MacPorts.
🌐
Kendil
bandel.kendil.com › 2020 › 01 › 25 › how-to-upgrade-openssl-macos
How to upgrade OpenSSL (macOS) – Bandel
January 25, 2020 - Problem : OpenSSL Security Advisory [3rd May 2016] High severitySolution : Update it 🙂 Mac OSX 10.11.4 Check version $ openssl version -a Backup old version $ sudo mv /usr/bin/openssl /usr/bin/openssl-old For 10.12.2 will get…(and maybe this should help)mv: rename /usr/bin/openssl to ...
🌐
GitHub
github.com › rvm › rvm › issues › 5380
Update OSX openssl requirement to openssl@3 · Issue #5380 · rvm/rvm
August 5, 2023 - Migrate formulae to openssl@3 Homebrew/homebrew-core#134251 · As a result, when we follow the security steps here (and install gpg using brew install gnupg), that will install openssl@3 as a brew dependency. When we then run rvm install 3.2.2 that will install openssl@1.1. At that point we have this: ... When both versions have been installed by brew, we get the error in my gist below. When only openssl@1.1 has been installed by brew, rvm install 3.2.2 will work.
Author   rvm