homebrew - trouble upgrading openssl?
solution to install from source and get around the homebrew error

brew install openssl


-> Warning: openssl-1.0.2j already installed, it's just not linked.

brew link openssl


->Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
  -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib

cd ~/scratch
git clone git@github.com:openssl/openssl.git
cd openssl
sudo mkdir /usr/local/ssl
sudo chmod 777 /usr/local/ssl
./config -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
make
make test
make install


now, you will think you failed. but per OpenSSL not getting linked with homebrew on El Capitan 10.11.6
you have to close your terminal then reopen it
now 

openssl version -a


will show that you are using the new version.