You can have the latest version of OpenSSL with the help of Brew. You can install Brew from the following website: http://brew.sh/. After this procedure, open a terminal and type:
brew update
brew install openssl
brew link --force openssl
Note: Press Enter after each command.
To check the version, type: openssl version -a
After this procedure, create a symlink using the following command: ln -s /usr/local/Cellar/openssl/1.0.1g/bin/openssl /usr/local/bin/openssl