As of Homebrew f4d2141 there is a --force option.
brew cleanup --force openssl
References: man brew
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.
installed openssl on mac with brew but nothing found on /usr/local/bin where other brew installed bins are located. Found my fresh openssl here:
/usr/local/opt/openssl/bin/openssl
Run it like this:
/usr/local/opt/openssl/bin/openssl version
I don't want to update OS X openssl, while some OS stuff or other 3rd party apps may have dependency on older version.
I also don't mind longer path than just openssl
Writing this here for all the Googlers who are looking for location of openssl installed by brew.
For what it's worth, I just used homebrew (http://brew.sh/):
brew update
brew install openssl
brew link --force openssl
openssl version -a
If one of the bad versions come up (1.0.1a-f), you can figure out which version of openssl you're using, this way:
which openssl
Often this is from /usr/bin. To make sure you get the updated version, drop a symlink into /usr/local/bin to point to the updated openssl, like this:
ln -s /usr/local/Cellar/openssl/1.0.1g/bin/openssl /usr/local/bin/openssl
As an alternative to that final step, some people replace the openssl in /usr/bin with a symlink to /usr/local/Cellar/openssl/1.0.1g/bin/openssl (or whatever your version is):
mv /usr/bin/openssl /usr/bin/openssl_OLD
ln -s /usr/local/Cellar/openssl/1.0.1g/bin/openssl /usr/bin/openssl
But this is known to cause problems with some more recent versions of OSX. Better to just insert a new symlink into /usr/local/bin, which should take precedence on your path over /usr/bin.
Or for those who are using mac ports, and are not worried about keeping the version
sudo port upgrade openssl
simples :-)