First execute the following commands to install openssl on OSX using Homebrew:
brew update
brew install openssl
brew link --force openssl
openssl version -a
If the new version has not been applied successfully, create a symlink to solve the problem. To do that, we need to figure out the location of openssl using