Updating OpenSSL to 1.1.1 on MacOS

16,166

Solution 1

Using brew:

brew update
brew install [email protected]
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
# Verify 
openssl version
# OpenSSL 1.1.1c  28 May 2019

Solution 2

https://stackoverflow.com/a/56639316 is a good canonical answer, but if you're looking for something simpler / one-off you may be able to get by with just this:

$ brew install [email protected]
$ /usr/local/opt/openssl/bin/openssl version
OpenSSL 1.1.1g  21 Apr 2020

So you could do something like this for example:

$ /usr/local/opt/openssl/bin/openssl rand -hex 32
a37d26158b53c8b43faa26ce8291fec9

If you don't have brew on your computer you can install it in one-line by following the instructions here:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Share:
16,166

Related videos on Youtube

user1222324562
Author by

user1222324562

Updated on May 25, 2022

Comments

  • user1222324562
    user1222324562 almost 2 years

    The new LTS 1.1.1 version of OpenSSL is out.

    How can I upgrade to it using homebrew on MacOS?

  • Yunnosch
    Yunnosch over 2 years
    Please note that the "accepted" tick can change any time because the author of the question can always move it. So please identify the answer you are extending by other means. I propose using the authors name. Also, please explain in which cases that answer fails. (I am no expert here, but I seem to remember that the profile is auto-applied with opening a shell.)