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.
Mar. 25, 2011
If you don't want to build OpenSSL from source and want an easy way of upgrading to the latest version of OpenSSL, I'd suggest taking the MacPorts route.
Download the correct .dmg file from http://www.macports.org/install.php. Open it and run the installer.
In the terminal, type:
$ sudo port sync; sudo port selfupdate; sudo port install openssl
Feb. 21, 2009
Before you can update your version of OpenSSL, you'll have to make
sure you have
make installed. You
can install these from the Apple Developer Tools CD that came with your
computer. Just stick the CD in and install.
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:
Now it's time to make:
And then install:
$ make install
Now I have the latest version of openssl installed in