Installing an updated version of OpenSSL on your Mac OS X
Feb. 21, 2009Why would you want to do this? - Unfortunately, Apple currently
ships their computers with an outdated version of OpenSSL. You can check
which version you have by typing:
$ openssl version
On my system, this returns OpenSSL 0.9.7l 28 Sep 2006. This
may be sufficient for you, but I wanted to use sha512, which was not
available on the 0.9.7l release.
Prerequisites - Before you can update your version of OpenSSL,
you'll have to make sure you have gcc and make
installed. You can install these from the Apple Developer Tools CD that
came with your computer. Just stick the CD in and install.
Installing OpenSSL - Go to http://openssl.org/ and grab the latest build.
Here's a picture of the site as I see it today:

As you can see, the latest build is openssl-0.9.8j. So just
download that wherever you want. I put it into ~/tmp. Untar and gunzip it:
$ tar -zxvf openssl-0.9.8j.tar.gz
Change your directory to the newly created folder. Now it's time to configure it. By default, the package is set to install openssl in/usr/local/openssl. I didn't want this, so I ran:
$ ./config --openssldir=~/tmp/openssl/
If you want the default locations, just run:$ ./config
Now it's time to make:$ make
And then install:$ make install
Now I have the latest version of openssl installed in ~/tmp/openssl/bin